Showing posts from 2019

DotVVM CRUD application with Entity Framework and Cosmos DB

What is DotVVM? DotVVM is open source MVVM framework for ASP.Net Core and OWIN and it is member of .NetFoundation . DotVVM is a free to use under Apache License but also have commercial extensions. DotVVM lets you build interactive web UIs with just C# and HTML using MVVM pattern. DotVVM framework is shipped with many build-in controls like GridView , FileUpload , Validators , and more. Why DotVVM? There are many reason and business scenarios that DotVVM is suitable for and very helpful like:  Migrating legacy ASP.Net web forms application to .Net Core. New ASP.Net applications that contains many forms with a lot of controls/components. To learn more about DotVVM framework visit . What is Azure Cosmos DB? Azure Cosmos DB is a NoSQL distributed and fully managed database service. Azure Cosmos DB provides different API for different NoSQL models like Document databases, Column databases, Graph databases and Key-Value database. You

Clean your JSON object before saving into Cloud Firestore database

If you have a registration form and you are collecting user's inputs to json object like user = {   'first_name' : 'Amir',   'middle_name':'',   'last_name':'Ismail'   'age' : 25,   'address' : '',   'phone':null }; notice middle_name , address , and phone fields have no value (empty string and null). If you want to save this in Cloud Firestore database, these fields will be saved which is not recommended because you are losing one of the advantages of  NoSQL document database which any document should contain only fields have value (except your business case requires that field to be exist in all documents even has no value) . To remove empty fields you have to check each input value and save only fields that have value. But if you have big form with many input fields or you have many forms checking each fields will be a nightmare and your code will be dirty. So I tried to write a TypeScrip