开发者

asp.net mvc diff between DeleteAllOnSubmit and deleteonSubmit

开发者 https://www.devze.com 2022-12-31 07:05 出处:网络
What is the real difference b/w DeleteAllOnSubmit and deleteonSubmit and开发者_开发技巧 which one is more appropiate to use?There is no such thing as DeleteOnSubmit nor DeleteAllOnSubmit in ASP.NET MV

What is the real difference b/w DeleteAllOnSubmit and deleteonSubmit and开发者_开发技巧 which one is more appropiate to use?


There is no such thing as DeleteOnSubmit nor DeleteAllOnSubmit in ASP.NET MVC, so I'll assume that you mean the methods in LINQ to SQL tables. (Correct me if not.)

Basically, you use DeleteOnSubmit to delete a single row from a table, by specifying a single entity which maps to the row you want to delete.

DeleteAllOnSubmit is there for you if you want to delete multiple rows from a table, by specifying multiple entities, more correctly an IEnumerable<> of those, which means that you can specify them in more or less any collection. (List<T>, Collection<T>, and many more.)

0

精彩评论

暂无评论...
验证码 换一张
取 消