Posts

MVC CRUD Sample

Image
  First create a solution File -> New -> Project       then    select  as followed image Now created solution.Create a table 'TblRegister' on sql server database   Add Entity-framework package to solution using NuGet Packager  Right click Model folder  then go to   Add->New Item   select  ADO.NET Entity Data Model Create Entity Model of our  'CRUD' Database     (If need EF model creation tutorial. please visit https://www.tutorialspoint.com/entity_framework/entity_database_first_approach.htm )               Now db Entity model created like below pic      For Creating 'RegisterController' Right click Controller folder -> Add Controller  and add below code to on RegisterController  CRUDEntities dbEntity = new CRUDEntities();         // GET: Register         public ActionResult Index()         {             var res = dbEntity.TblRegisters.ToList();             return View(res);         }         public ActionResult Create()         {             return

UBL XML Creation in .NET

Image
  Watch Video Tutorial UBL (Universal Business Language) XML is a structured xml is very important in zatca implementation in KSA. Here is the tutorial for generating UBL XML in Asp.Net c#.  Create a project in c# application. Here  I created console application  in .NET 7.0 then add class  'Invoice.cs' then open sample invoice format (eg: StandardInvoice.xml that is provided by zatca in their sdk tool) (or download sample file  here   copy the the whole content in sample xml. then move to Invoice class that we created then go to edit -> paste special -> Paste XML as Classes then will create property classed based on the sample xml next we have to code on 'program.cs' file