var customerList = db.Customers.SqlQuery("Select * From Customers").ToList<Customers>();
int customerId = db.Database.SqlQuery<int>("Select customerId From Customers where customerName='MAHDI'").FirstOrDefault<int>();
int result = db.Database.ExecuteSqlCommand("delete from Customers where customerId = 100");
Aucun commentaire:
Enregistrer un commentaire