1660203673
C# and LINQ for data access with EF Core. Learn how Entity Framework (EF) Core simplifies working with a cross-platform SQLite database in a .NET MAUI app and handles everything from complex queries to multiple updates that execute with a single line of developer code.
Forget magic strings, hand-written SQL queries and unfamiliar SDKs to deal with local data in your .NET MAUI apps. Entity Framework Core, also known as EF Core, is an object-mapper that empowers .NET developers to work with databases using the .NET languages and type system they know and love. In this session, learn how EF Core simplifies working with a cross-platform SQLite database in a .NET MAUI app and handles everything from complex queries to multiple updates that execute with a single line of developer code. Discover how client developers can use the same APIs that drive most REST, GraphQL, and gRPC backends on the server!
#dotnet #csharp #efcore #entityframework #linq #sqlite
1655347260
REST API は、サーバーと通信するために複数のクライアント(またはAPPS)が使用できるアプリケーションプログラミングインターフェイスです。
Rest APIは、アプリケーションに必要なデータを便利な形式(JSONやXMLなど)で保存および取得する一種のWebサービスです。
ステートレスであるため、Webサービスにアクセスするために依存するコードライブラリを必要としないため、開発者に大きな柔軟性を提供します。
RESTでサポートされている多くのプロトコルの中で、最も一般的なものはHTTPです。
HTTPRequestを使用してクライアントから要求が送信されると、対応する応答がHTTPResponseを使用してサーバーから送信されます。リクエストとレスポンスでサポートされている最も広く使用されている機械可読形式は、JSON(Javascript Object Notification)とXML(Extensible Markup Language)です。
RESTは、コンピューター科学者のROYFIELDINGによって作成されました。
REST APIを使用して、さまざまなアクションを実行できます。アクションに基づいて、関連する方法を使用する必要があります。以下は、RESTでサポートされている5つの方法です。
これを例で見てみましょう。私たちは、母親が十分な休息をとることが決してないことを知っています。しかし、これらの休むことのないママを例として取り上げ、RestAPIをどのように使用するかを見てみましょう。:)
生まれたばかりの赤ちゃんによる過度の要求の中で、おむつはリーダーボードで最初に位置します。
母親は赤ちゃんのためにすべてが最善であることを望んでいます。ですから、母親が赤ちゃんに最適なおむつを選びたいと思うのは明らかです。そこで、彼女はショッピングWebサイト(フリップカートを想定)にアクセスして、おむつを検索します。これにより、すべてのおむつのリストを取得するために、フリップカートのサーバーにHTTPリクエストが送信されます。FlipkartのサーバーはHTTP応答で応答します。これは、いくつかの基本的な詳細を含むおむつのリストを含むJSONオブジェクト(想定)になります。FlipkartのWebサイトは、この応答を読み取り、人間が読める形式に変換して、母親が見ることができるようにWebページに表示します。
彼女が生まれたばかりの赤ちゃんのために特定のおむつを選び、それを彼女のリストに追加した後。これにより、POSTリクエストが作成され、おむつのブランド、サイズ、数量、価格などを含む新しいレコードがフリップカートのデータベースに作成されます。
彼女の赤ちゃんは成長を続け、すぐに新生児のサイズを超えます。母親がまだおむつのブランドを気に入っていて、サイズを大きくしたいとします。彼女がしなければならないのは、新しいおむつのサイズを選択することだけです。彼女がおむつのサイズを新生児のサイズからサイズ1に更新すると、これによりPATCHメソッドがトリガーされ、他のすべては同じままで、おむつのサイズのみが変更されます。
母親が現在のブランドを変更し、別のブランドに切り替えることを決定することは非常に一般的です。ここで、母親はPUTリクエストを開始します。ここで、以前に選択されたブランドを含むデータ全体が変更され、新しく選択されたブランドに対応するデータに置き換えられます。
最後に、いくつかのGET、POST、PUT、およびPATCHを含む一連の実験の後、母親が子供をトイレトレーニングする時が来ました。彼女が子供を訓練することに成功した場合、おむつはもはや必要ありません。これにより、 DELETE要求がトリガーされます。
前提条件
ステップ1
Visual Studio 2022を開き、asp.netコアwebapiプロジェクトを作成します。
ステップ2
NugetからNpgsql.EntityFrameworkCore.PostgreSQLとMicrosoft.EntityFrameworkCore.Toolsをインストールします
ステップ3
Product.csとOrder.csを作成します
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("product")]
public class Product {
[Key, Required]
public int id {
get;
set;
}
[Required]
public string ? name {
get;
set;
}
public string ? brand {
get;
set;
}
public string ? size {
get;
set;
}
public decimal price {
get;
set;
}
public virtual ICollection < Order > orders {
get;
set;
}
}
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("order")]
public class Order {
[Key, Required]
public int id {
get;
set;
}
public int product_id {
get;
set;
}
[Required]
public string ? name {
get;
set;
}
public string ? address {
get;
set;
}
public string ? phone {
get;
set;
}
public DateTime createdon {
get;
set;
}
public virtual Product product {
get;
set;
}
}
ステップ4
DbContextクラスから継承されたEF_DataContextを作成します
using Microsoft.EntityFrameworkCore;
public class EF_DataContext: DbContext {
public EF_DataContext(DbContextOptions < EF_DataContext > options): base(options) {}
protected override void OnModelCreating(ModelBuilder modelBuilder) {
modelBuilder.UseSerialColumns();
}
public DbSet <Product> Products {
get;
set;
}
public DbSet <Order> Orders {
get;
set;
}
}
ステップ5
appsetting.jsonを開きます
"ConnectionStrings": {
"Ef_Postgres_Db": "Server=localhost;Database=shopingpostgres;Port=5432;User Id=postgres;Password=qwerty1234;"
}
ステップ6
Program.csを開く
builder.Services.AddDbContext < EF_DataContext > (o => o.UseNpgsql(builder.Configuration.GetConnectionString("Ef_Postgres_Db")));
ステップ7
2つのコマンドを実行します
Add-Migration InitialDatabase
Update-Database
ステップ8
API通信に使用されるAPI製品モデルと注文モデルを作成します
public class Product {
public int id {
get;
set;
}
public string ? name {
get;
set;
}
public string ? brand {
get;
set;
}
public string ? size {
get;
set;
}
public decimal price {
get;
set;
}
}
public class Order {
public int id {
get;
set;
}
public int product_id {
get;
set;
}
public string ? name {
get;
set;
}
public string ? address {
get;
set;
}
public string ? phone {
get;
set;
}
public DateTime createdon {
get;
set;
}
public virtual Product product {
get;
set;
}
}
ステップ9
データベースと通信するDBhelperクラスを追加します
using ShoppingWebApi.EfCore;
namespace ShoppingWebApi.Model {
public class DbHelper {
private EF_DataContext _context;
public DbHelper(EF_DataContext context) {
_context = context;
}
/// <summary>
/// GET
/// </summary>
/// <returns></returns>
public List < ProductModel > GetProducts() {
List < ProductModel > response = new List < ProductModel > ();
var dataList = _context.Products.ToList();
dataList.ForEach(row => response.Add(new ProductModel() {
brand = row.brand,
id = row.id,
name = row.name,
price = row.price,
size = row.size
}));
return response;
}
public ProductModel GetProductById(int id) {
ProductModel response = new ProductModel();
var row = _context.Products.Where(d => d.id.Equals(id)).FirstOrDefault();
return new ProductModel() {
brand = row.brand,
id = row.id,
name = row.name,
price = row.price,
size = row.size
};
}
/// <summary>
/// It serves the POST/PUT/PATCH
/// </summary>
public void SaveOrder(OrderModel orderModel) {
Order dbTable = new Order();
if (orderModel.id > 0) {
//PUT
dbTable = _context.Orders.Where(d => d.id.Equals(orderModel.id)).FirstOrDefault();
if (dbTable != null) {
dbTable.phone = orderModel.phone;
dbTable.address = orderModel.address;
}
} else {
//POST
dbTable.phone = orderModel.phone;
dbTable.address = orderModel.address;
dbTable.name = orderModel.name;
dbTable.Product = _context.Products.Where(f => f.id.Equals(orderModel.product_id)).FirstOrDefault();
_context.Orders.Add(dbTable);
}
_context.SaveChanges();
}
/// <summary>
/// DELETE
/// </summary>
/// <param name="id"></param>
public void DeleteOrder(int id) {
var order = _context.Orders.Where(d => d.id.Equals(id)).FirstOrDefault();
if (order != null) {
_context.Orders.Remove(order);
_context.SaveChanges();
}
}
}
}
ステップ10
Apiコントローラーを作成し、ShoppingRestApiという名前を付けます
using Microsoft.AspNetCore.Mvc;
using ShoppingWebApi.EfCore;
using ShoppingWebApi.Model;
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
namespace ShoppingWebApi.Controllers {
[ApiController]
public class ShoppingApiController: ControllerBase {
private readonly DbHelper _db;
public ShoppingApiController(EF_DataContext eF_DataContext) {
_db = new DbHelper(eF_DataContext);
}
// GET: api/<ShoppingApiController>
[HttpGet]
[Route("api/[controller]/GetProducts")]
public IActionResult Get() {
ResponseType type = ResponseType.Success;
try {
IEnumerable < ProductModel > data = _db.GetProducts();
if (!data.Any()) {
type = ResponseType.NotFound;
}
return Ok(ResponseHandler.GetAppResponse(type, data));
} catch (Exception ex) {
return BadRequest(ResponseHandler.GetExceptionResponse(ex));
}
}
// GET api/<ShoppingApiController>/5
[HttpGet]
[Route("api/[controller]/GetProductById/{id}")]
public IActionResult Get(int id) {
ResponseType type = ResponseType.Success;
try {
ProductModel data = _db.GetProductById(id);
if (data == null) {
type = ResponseType.NotFound;
}
return Ok(ResponseHandler.GetAppResponse(type, data));
} catch (Exception ex) {
return BadRequest(ResponseHandler.GetExceptionResponse(ex));
}
}
// POST api/<ShoppingApiController>
[HttpPost]
[Route("api/[controller]/SaveOrder")]
public IActionResult Post([FromBody] OrderModel model) {
try {
ResponseType type = ResponseType.Success;
_db.SaveOrder(model);
return Ok(ResponseHandler.GetAppResponse(type, model));
} catch (Exception ex) {
return BadRequest(ResponseHandler.GetExceptionResponse(ex));
}
}
// PUT api/<ShoppingApiController>/5
[HttpPut]
[Route("api/[controller]/UpdateOrder")]
public IActionResult Put([FromBody] OrderModel model) {
try {
ResponseType type = ResponseType.Success;
_db.SaveOrder(model);
return Ok(ResponseHandler.GetAppResponse(type, model));
} catch (Exception ex) {
return BadRequest(ResponseHandler.GetExceptionResponse(ex));
}
}
// DELETE api/<ShoppingApiController>/5
[HttpDelete]
[Route("api/[controller]/DeleteOrder/{id}")]
public IActionResult Delete(int id) {
try {
ResponseType type = ResponseType.Success;
_db.DeleteOrder(id);
return Ok(ResponseHandler.GetAppResponse(type, "Delete Successfully"));
} catch (Exception ex) {
return BadRequest(ResponseHandler.GetExceptionResponse(ex));
}
}
}
}
ステップ11
API応答を処理する応答モデルと応答ハンドラーを追加します
namespace ShoppingWebApi.Model {
public class ApiResponse {
public string Code {
get;
set;
}
public string Message {
get;
set;
}
public object ? ResponseData {
get;
set;
}
}
public enum ResponseType {
Success,
NotFound,
Failure
}
}
次に、ビデオで示されているように、POSTMANを使用してAPIをテストします。
このストーリーは、もともとhttps://www.c-sharpcorner.com/article/restful-api-in-net-core-using-ef-core-and-postgres/で公開されました
1655347140
REST API es una interfaz de programación de aplicaciones que pueden utilizar varios clientes (o APLICACIONES) para comunicarse con un servidor.
Rest API es un tipo de servicio web que almacena y recupera los datos necesarios para su aplicación en un formato conveniente (por ejemplo, JSON o XML).
Proporciona una gran flexibilidad a los desarrolladores, ya que no necesita ninguna biblioteca de código dependiente para acceder a los servicios web, ya que no tiene estado.
Entre los muchos protocolos admitidos por REST, el más común es HTTP .
Cuando se envía una solicitud desde el cliente mediante HTTPRequest , se envía una respuesta correspondiente desde el servidor mediante HTTPResponse . Los formatos legibles por máquina más utilizados y admitidos para solicitudes y respuestas son JSON (Notificación de objetos Javascript) y XML (Lenguaje de marcado extensible).
REST fue creado por el informático ROY FIELDING .
Las API REST se pueden usar para realizar diferentes acciones. En función de las acciones, se debe utilizar el método pertinente. Los siguientes son los 5 métodos compatibles con REST.
Veamos esto con un ejemplo. Sabemos que las madres nunca descansan lo suficiente. Pero tomemos estas mamás sin descanso como ejemplo y veamos cómo usan Rest API. :)
Entre las demandas excesivas de un bebé recién nacido, el cambio de pañales ocupa el primer lugar en la tabla de clasificación.
Una madre quiere todo lo mejor para el bebé. Entonces, es obvio que la madre querría elegir el mejor pañal para su bebé. Entonces, ella va a un sitio web de compras (supongamos: flipkart) y busca pañales. Esto enviará una solicitud HTTP al servidor de flipkart para OBTENER la lista de todos los pañales. El servidor de Flipkart responde con una respuesta HTTP que será un objeto JSON (supongamos) que contiene una lista de pañales con algunos detalles básicos. El sitio web de Flipkart lee esta Respuesta, la convierte a un formato legible por humanos y la muestra en la página web para que la madre la vea.
Después, elige un pañal en particular para su bebé recién nacido y lo agrega a su lista. Esto crea una solicitud POST donde se crea un nuevo registro en la base de datos de flipkart que contiene la marca, el tamaño, la cantidad, el precio, etc. del pañal.
Su bebé sigue creciendo y pronto supera el tamaño del recién nacido. Supongamos que a la madre todavía le gusta la marca de pañales y solo quiere aumentar su tamaño, todo lo que tiene que hacer es elegir el nuevo tamaño de pañal. Cuando actualiza el tamaño del pañal del tamaño recién nacido al tamaño 1, se activa un método PATCH donde todo lo demás permanece igual y solo se cambia el tamaño del pañal.
Es muy común que la madre cambie la marca actual y decida cambiar a una alternativa. Aquí, la madre iniciará una solicitud PUT donde todos los datos que contienen la marca elegida previamente se modifican y reemplazan con los datos correspondientes a la marca recién elegida.
Finalmente, después de una serie de experimentos que involucran varios GET, POST, PUT y PATCH, es hora de que la madre enseñe al niño a ir al baño. Si logra entrenar al niño, ya no necesitará los pañales. Esto activa una solicitud DELETE .
PRERREQUISITOS
Paso 1
Abra Visual Studio 2022 y cree el proyecto asp.net core webapi.
Paso 2
Instale Npgsql.EntityFrameworkCore.PostgreSQL y Microsoft.EntityFrameworkCore.Tools desde Nuget
Paso 3
Crear Product.cs y Order.cs
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("product")]
public class Product {
[Key, Required]
public int id {
get;
set;
}
[Required]
public string ? name {
get;
set;
}
public string ? brand {
get;
set;
}
public string ? size {
get;
set;
}
public decimal price {
get;
set;
}
public virtual ICollection < Order > orders {
get;
set;
}
}
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("order")]
public class Order {
[Key, Required]
public int id {
get;
set;
}
public int product_id {
get;
set;
}
[Required]
public string ? name {
get;
set;
}
public string ? address {
get;
set;
}
public string ? phone {
get;
set;
}
public DateTime createdon {
get;
set;
}
public virtual Product product {
get;
set;
}
}
Paso 4
Crear EF_DataContext heredado de la clase DbContext
using Microsoft.EntityFrameworkCore;
public class EF_DataContext: DbContext {
public EF_DataContext(DbContextOptions < EF_DataContext > options): base(options) {}
protected override void OnModelCreating(ModelBuilder modelBuilder) {
modelBuilder.UseSerialColumns();
}
public DbSet <Product> Products {
get;
set;
}
public DbSet <Order> Orders {
get;
set;
}
}
Paso 5
Abrir appsetting.json
"ConnectionStrings": {
"Ef_Postgres_Db": "Server=localhost;Database=shopingpostgres;Port=5432;User Id=postgres;Password=qwerty1234;"
}
Paso 6
Abrir programa.cs
builder.Services.AddDbContext < EF_DataContext > (o => o.UseNpgsql(builder.Configuration.GetConnectionString("Ef_Postgres_Db")));
Paso 7
Ejecuta los 2 comandos
Add-Migration InitialDatabase
Update-Database
Paso 8
Cree los modelos de pedido y producto API que se utilizarán para la comunicación API
public class Product {
public int id {
get;
set;
}
public string ? name {
get;
set;
}
public string ? brand {
get;
set;
}
public string ? size {
get;
set;
}
public decimal price {
get;
set;
}
}
public class Order {
public int id {
get;
set;
}
public int product_id {
get;
set;
}
public string ? name {
get;
set;
}
public string ? address {
get;
set;
}
public string ? phone {
get;
set;
}
public DateTime createdon {
get;
set;
}
public virtual Product product {
get;
set;
}
}
Paso 9
Agregue la clase DBhelper que hablará con su base de datos
using ShoppingWebApi.EfCore;
namespace ShoppingWebApi.Model {
public class DbHelper {
private EF_DataContext _context;
public DbHelper(EF_DataContext context) {
_context = context;
}
/// <summary>
/// GET
/// </summary>
/// <returns></returns>
public List < ProductModel > GetProducts() {
List < ProductModel > response = new List < ProductModel > ();
var dataList = _context.Products.ToList();
dataList.ForEach(row => response.Add(new ProductModel() {
brand = row.brand,
id = row.id,
name = row.name,
price = row.price,
size = row.size
}));
return response;
}
public ProductModel GetProductById(int id) {
ProductModel response = new ProductModel();
var row = _context.Products.Where(d => d.id.Equals(id)).FirstOrDefault();
return new ProductModel() {
brand = row.brand,
id = row.id,
name = row.name,
price = row.price,
size = row.size
};
}
/// <summary>
/// It serves the POST/PUT/PATCH
/// </summary>
public void SaveOrder(OrderModel orderModel) {
Order dbTable = new Order();
if (orderModel.id > 0) {
//PUT
dbTable = _context.Orders.Where(d => d.id.Equals(orderModel.id)).FirstOrDefault();
if (dbTable != null) {
dbTable.phone = orderModel.phone;
dbTable.address = orderModel.address;
}
} else {
//POST
dbTable.phone = orderModel.phone;
dbTable.address = orderModel.address;
dbTable.name = orderModel.name;
dbTable.Product = _context.Products.Where(f => f.id.Equals(orderModel.product_id)).FirstOrDefault();
_context.Orders.Add(dbTable);
}
_context.SaveChanges();
}
/// <summary>
/// DELETE
/// </summary>
/// <param name="id"></param>
public void DeleteOrder(int id) {
var order = _context.Orders.Where(d => d.id.Equals(id)).FirstOrDefault();
if (order != null) {
_context.Orders.Remove(order);
_context.SaveChanges();
}
}
}
}
Paso 10
Cree su controlador Api, asígnele el nombre ShoppingRestApi
using Microsoft.AspNetCore.Mvc;
using ShoppingWebApi.EfCore;
using ShoppingWebApi.Model;
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
namespace ShoppingWebApi.Controllers {
[ApiController]
public class ShoppingApiController: ControllerBase {
private readonly DbHelper _db;
public ShoppingApiController(EF_DataContext eF_DataContext) {
_db = new DbHelper(eF_DataContext);
}
// GET: api/<ShoppingApiController>
[HttpGet]
[Route("api/[controller]/GetProducts")]
public IActionResult Get() {
ResponseType type = ResponseType.Success;
try {
IEnumerable < ProductModel > data = _db.GetProducts();
if (!data.Any()) {
type = ResponseType.NotFound;
}
return Ok(ResponseHandler.GetAppResponse(type, data));
} catch (Exception ex) {
return BadRequest(ResponseHandler.GetExceptionResponse(ex));
}
}
// GET api/<ShoppingApiController>/5
[HttpGet]
[Route("api/[controller]/GetProductById/{id}")]
public IActionResult Get(int id) {
ResponseType type = ResponseType.Success;
try {
ProductModel data = _db.GetProductById(id);
if (data == null) {
type = ResponseType.NotFound;
}
return Ok(ResponseHandler.GetAppResponse(type, data));
} catch (Exception ex) {
return BadRequest(ResponseHandler.GetExceptionResponse(ex));
}
}
// POST api/<ShoppingApiController>
[HttpPost]
[Route("api/[controller]/SaveOrder")]
public IActionResult Post([FromBody] OrderModel model) {
try {
ResponseType type = ResponseType.Success;
_db.SaveOrder(model);
return Ok(ResponseHandler.GetAppResponse(type, model));
} catch (Exception ex) {
return BadRequest(ResponseHandler.GetExceptionResponse(ex));
}
}
// PUT api/<ShoppingApiController>/5
[HttpPut]
[Route("api/[controller]/UpdateOrder")]
public IActionResult Put([FromBody] OrderModel model) {
try {
ResponseType type = ResponseType.Success;
_db.SaveOrder(model);
return Ok(ResponseHandler.GetAppResponse(type, model));
} catch (Exception ex) {
return BadRequest(ResponseHandler.GetExceptionResponse(ex));
}
}
// DELETE api/<ShoppingApiController>/5
[HttpDelete]
[Route("api/[controller]/DeleteOrder/{id}")]
public IActionResult Delete(int id) {
try {
ResponseType type = ResponseType.Success;
_db.DeleteOrder(id);
return Ok(ResponseHandler.GetAppResponse(type, "Delete Successfully"));
} catch (Exception ex) {
return BadRequest(ResponseHandler.GetExceptionResponse(ex));
}
}
}
}
Paso 11
Agregue el modelo de respuesta y el controlador de respuesta que manejará sus respuestas API
namespace ShoppingWebApi.Model {
public class ApiResponse {
public string Code {
get;
set;
}
public string Message {
get;
set;
}
public object ? ResponseData {
get;
set;
}
}
public enum ResponseType {
Success,
NotFound,
Failure
}
}
Ahora pruebe las API usando POSTMAN como se muestra en el video.
Esta historia se publicó originalmente en https://www.c-sharpcorner.com/article/restful-api-in-net-core-using-ef-core-and-postgres/
1651129099
Jon P. Smith, author of Entity Framework Core in Action, explains what a multi-tenant app is and then digs into the things you need to do to make a multi-tenant app using ASP.NET Core with EF Core.
00:00 Countdown
02:19 Introduction and Community Links
18:25 What are multi-tenant web applications?
21:14 Single level multi-tenant demo
29:00 Partitioning tenants with EF Core QueryFilter
38:00 Admin features: creating users and tenants
43:00 Q&A
43:00 Hierarchical multi-tenant
59:00 How to get started
1:06:30 Database sharding and connection string management
1:16:30 Scaling with Azure SQL Elastic Pools
1:19:00 Conclusion
Community Links: https://www.theurlist.com/aspnet-standup-2021-04-26
Project link: https://github.com/JonPSmith/AuthPermissions.AspNetCore
#aspnetcore #dotnet #efcore
1643272662
What’s the best way to run automated tests on an application that uses Entity Framework Core? Jon P Smith, author of the book “Entity Framework Core in Action” covers three ways to create automated tests for your code and looks at the EF Core test “pain points” and how to get around them.
#entityframework #efcore #testing #dotnet
1642039452
The plan for EF7 has been published. In this episode, the EF Core/.NET Data team will review the details of the plan and answer live questions about the roadmap.
#entityframework #efcore #ef7
1635807840
CRUD using Stored Procedure with EF Core Example Complete CRUD Operations Example.
1635764580
BULK CRUD using EF Core Example BulkInsert BulkSave BulkUpdate BulkDelete. Complete CRUD Operation Example.
1635739200
In this tutorial, we will learn how to generate HierarchyId with EF Core and SQL Server. ASP.NET Core Example.
1634797014
Back to the basics: EF Core and ASP.NET Core from the documentation team.
#efcore #aspnet #aspnetcore
1632367703
PostgreSQL has some advanced capabilities not usually found in other relational databases. In this session we'll go over some of them, and see how EF Core makes these accessible.
#efcore #entityframework #postgresql
1627525823
OData is one of the best protocols out there to supercharge your ASP.NET Core APIs with so many capabilities such as shaping, filtering, batching and ordering the data on the fly - it executes it's queries on the server which tremendously improves the performance on client side. Hassan talks all things OData on the Community Standup.
#efcore #api #odata
1626316693
Learn what a query plan is, how to view EF Core query plan in LINQPad, find missing indexes, and improve performance of your queries.
Community Links: https://www.theurlist.com/efcore-standup-2021-07-14
Featuring: Jeremy Likness (@jeremylikness), Giorgi Dalakishvili (@GioDalakishvili)
Get your questions answered on the Microsoft Q&A for .NET - https://aka.ms/dotnetqa
Learn .NET with free self-guided learning from Microsoft Learn: http://aka.ms/learndotnet
#efcore #linq #linqpad
#database #linqpad #efcore #linq
1625134620
This video will illustrate how to create a CRUD in ASP.NET Core using Entity Framework Core, using the code first approach.
Github link:
https://github.com/mohamadlawand087/v4-Phonebook
DotNet SDK:
https://dotnet.microsoft.com/download
Visual Studio Code:
https://code.visualstudio.com
SQLite browser:
https://sqlitebrowser.org/
Dotnet New:
https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new
AspNet Authentication Video:
https://www.youtube.com/watch?v=9nPS_d8scs0&t=1s
Computer and Monitor:
Apple MacBook Pro:
https://amzn.to/35UFlX9
Apple Magic Keyboard:
https://amzn.to/3byXY6s
Apple Magic Trackpad 2:
https://amzn.to/3bBTTyv
Razor Microphone:
https://amzn.to/3q1xYVa
Samsung T7 SSD:
https://amzn.to/3sni2yF
Dell P2419HC USB-C 24 Inch Full HD:
https://amzn.to/2LKKtpx
BONTEC Dual Monitor Stand:
https://amzn.to/39t3CEt
#dotnet #beginners #efcore #aspnetcore
#aspnetcore #efcore #dotnet #asp.net core 5.0
1625123700
In this video we will be creating a simple Asp.Net Core 5 Rest API Todo application where we will be able to add, edit, delete and view todo items and we will be utilising SQLite to store our data. We will be using Entity Framework core to communicate with the Database.
Source Code link:
https://github.com/mohamadlawand087/v6-RestApiNetCore5
DotNet SDK:
https://dotnet.microsoft.com/download
Visual Studio Code:
https://code.visualstudio.com/](https://code.visualstudio.com
Dbeaver browser:
https://dbeaver.io/download/](https://dbeaver.io/download/
Dotnet New:
https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new
AspNet Authentication Video:
https://www.youtube.com/watch?v=9nPS_d8scs0&t=1s
Rest API (best practise):
https://docs.microsoft.com/en-us/azure/architecture/best-practices/api-design
Computer and Tech stuff:
Apple MacBook Pro:
https://amzn.to/35UFlX9
Apple Magic Keyboard:
https://amzn.to/3byXY6s
Apple Magic Trackpad 2:
https://amzn.to/3bBTTyv
Razor Microphone:
https://amzn.to/3q1xYVa
Samsung T7 SSD:
https://amzn.to/3sni2yF
Dell P2419HC USB-C 24 Inch Full HD:
https://amzn.to/2LKKtpx
BONTEC Dual Monitor Stand:
https://amzn.to/39t3CEt
#dotnet #rest #api #beginners #efcore #aspnetcore #stepbystep
#efcore #api #rest #dotnet #aspnetcore