In Entity Framework to delete an Object, we first fetched the object and than delete that particular object or record. This one result in to performance penalty as there are two SQL query executed first one for “Select” query and second one for “Delete” query. In Entity Framework 6.0 or above Microsoft provide solution to delete an object(record) with out retrieving or fetching it.
In Sql server if we want to be sure that specific column exists in given database table or not than you can check either manually or using query for large number of columns of table. In this tutorial we will see how to check if column exist in database table.
In this article we will see that how to upload a file in Asp.net MVC as well we go through different different criteria like single file upload, multiple files upload and strongly type viewmodel file upload in MVC.
Recently I have faced this question in interview that how to add or insert multiple rows in a single query at once. So I have find out two different solutions for this query. Let’s see the solutions.
Frequently in interview we face the question that how to get Host name(machine name), Server name, User name and DataBase name of Sql Server which are connected in Networks. In this article we will see that how to find Host name(machine name), Server name, User name and DataBase name using Sql select query in Sql Server management studio which is quite easy.
Today in this article we will see how to render razor view or partial view to string in Asp.net MVC. View or partial view contains generally html tags and razor syntax, if we can convert view into string using C# than we can pass string as a Json Result from controller to view(for Ajax call). Let’s see sample code.
We have many times scenario of converting Amount Numbers which are Rupees, Dollar, Pound, Euro or any currency into Words while we programmed. Today We will see the easiest logic of converting Amount numbers into words in C#,VB or Asp.net without using of any loop and recursive functionality.