Firstly, I checked this page but It doesn't seem to help me.
I'm using this edmx file.
Here is my code sample:
private void btnSil_Click(object sender, EventArgs e)
{
Int64 isbn = Int64.Parse(dgvKitaplar.CurrentRow.Cells["ISBN"].Value.ToString());
entity.sp_Sil(isbn);
entity.SaveChanges();
dgvKitaplar.DataSource = entity.sp_Update();
}
Here is my sp_Update() stored procedure
create proc [dbo].[sp_Sil]
@toDeleteBookId bigint
as
begin
delete from BookInfo
where ISBN=@toDeleteBookId
end
What I'm trying to do is deleting a book from the library database via datagridview's current row. First of all, if there is a better/more secure way to do this, I would like to know.
Why am I getting "EntityCommandExecutionException was unhandled"? I know it's quite easy but I'm trying to learn c# and .net environment.
Thanks in advance.
@I guess it's because of something about data tables but I still can't find what it is.