using simple queries in ASP.NET MVC

后端 未结 4 1503
遇见更好的自我
遇见更好的自我 2020-12-29 16:03

I checked google but found nothing good. I am searching for usinf Traditional SQL queries in MVC instead of Entity framework etc. So it would be go

4条回答
  •  遥遥无期
    2020-12-29 16:41

    Using entity framework it can be done

    Entitiesdb db = new Entitiesdb();
    string query="delete from tableA where id=@id"
    db.Database.ExecuteSqlCommand(query, @id);
    

提交回复
热议问题