You are developing an ASP.NET MVC application. The application has a page that updates
an image stored in a database. Members of the EntityClient namespace are used to access
an ADO.NET Entity Framework data model. Images and associated metadata are stored in
a single database table.
You need to run a single query that updates an image and associated metadata in the
database while returning only the number of affected rows.
Which method of the EntityCommand type should you use?
A.
ExecuteNonQuery()
B.
ExecutcScalar()
C.
ExecuteDbDataReader()
D.
ExecuteReader()
Answer is A.
Return the Number of Affected rows.
+1 for A
+1 for A
https://technet.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.executescalar(v=vs.80).aspx
https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.executenonquery(v=vs.110).aspx
+1 for A