What is the real difference b/w DeleteAllOnSubmit and deleteonSubmit and which one is more appropiate to use?
What is the real difference b/w DeleteAllOnSubmit and deleteonSubmit and which one is more
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no such thing as
DeleteOnSubmitnorDeleteAllOnSubmitin ASP.NET MVC, so I’ll assume that you mean the methods in LINQ to SQL tables. (Correct me if not.)Basically, you use
DeleteOnSubmitto delete a single row from a table, by specifying a single entity which maps to the row you want to delete.DeleteAllOnSubmitis there for you if you want to delete multiple rows from a table, by specifying multiple entities, more correctly anIEnumerable<>of those, which means that you can specify them in more or less any collection. (List<T>,Collection<T>, and many more.)