To partition your asp.net core project into several csprojs is easy or maybe you want to make use of one or more common functionality between multiple apps. ASP.Net Core came with an abstraction over the resource of an app, it’s called application parts. Using an appliction part, we can share controllers,views, tag helpers etc intoContinue reading “ASP .NET Core MVC, partitioned controllers and views into several csprojs”
Category Archives: .net core
asp .net core logging with Serilog
Easier logging in asp.net core with Serilog, is convenient and maintenance free when storing logs into file.
[CRUD] ASP .NET CORE MVC menggunakan Dapper
CRUD di asp .net core mvc menggunakan Dapper untuk mysql dan sql server
Cosuming JSON Rest API in C#
There is a lof of good libraries to consume JSON API in C#, we can search for rest client in nuger.org. First item on the search result is RestSharp, a simple REST and Http API client. You can also use System.Net.Http.HttpClient as it is a base for sending http requests and receiving http responses providedContinue reading “Cosuming JSON Rest API in C#”
c#: Sorting List of Complex Type or an Object using IComparable
To do sorting with List<T> of your own object type you need to implement IComparable<T> interface into the class itself. So when you have a List of the object you can easily call listOfObject.Sort() to sort the content of that list. For example: imagine you have a Class Schedule for work schedule and that classContinue reading “c#: Sorting List of Complex Type or an Object using IComparable”
asp.net core MVC login menggunakan custom database. Part-2
HttpPost, HttpGet dan Authorize attributes. Melanjutkan artikel part-1. Untuk meng-handle autentikasi dan input dari login form yang dikirim browser dengan metod POST, harus menggunakan HttpPost attribute pada method/action yang ada di SecurityController. Untuk itu tambahkan method baru yaitu Login dengan parameter type LoginViewModel. Saya akan menjelaskan gambar diatas, attribute yang dipakai adalah [HttpPost], [AllowAnonymous] danContinue reading “asp.net core MVC login menggunakan custom database. Part-2”
asp.net core MVC login menggunakan custom database. Part-1
Aspnet core menyediakan template bawaan yang sudah lengkap dimana terdapat konfigurasi dasar MVC dan beberapa setting route untuk mapping request yang datang dari user dan menyalurkannya ke controller. Melanjutkan tulisan sebelumnya belajar aspnet core MVC. Pada tulisan ini saya akan jelaskan bagaimana menggunakan aspnet core MVC cookie authentication dengan memanfaatkan database yang sudah ada. PadaContinue reading “asp.net core MVC login menggunakan custom database. Part-1”
Belajar .NET Core MVC di Linux.
Install .net core sdk dan cli. belajar .NET Core MVC, pertama lakukan instalasi .NET Core SDK dengan tutorial ini. tergantung operating system yang dipakai, .net core adalah open source .net yang bisa berjalan di windows,linux dan mac os. Karena cross platform maka .net core menjadi salah satu platform yang terkenal beberapa tahun terakhir ini, meskipunContinue reading “Belajar .NET Core MVC di Linux.”