efcore icon indicating copy to clipboard operation
efcore copied to clipboard

Database.ExecuteSqlCommand returns void?

Open giancarloa opened this issue 10 years ago • 2 comments

Hi... in EF6 Database.ExecuteSqlCommand had a int return type that represented the number of records affected... now in EF7 however it returns void... is that they way it should be???? is there another way in EF7 to execute a command and get the number of records affected???? I am trying to avoid raw ado.net code... thanks

giancarloa avatar Jan 29 '16 16:01 giancarloa

Already fixed in our current code base :smile: https://github.com/aspnet/EntityFramework/blob/2bc7eaa29cc57f7d550ab4eeba24b07c940595a2/src/Microsoft.EntityFrameworkCore.Relational/RelationalDatabaseFacadeExtensions.cs#L41

rowanmiller avatar Jan 29 '16 17:01 rowanmiller

thanks @rowanmiller ....

giancarloa avatar Jan 29 '16 19:01 giancarloa