From: Daniel R. <da...@ac...> - 2017-08-26 13:37:24
|
<html><head><title>Re: [Firebird-net-provider] EF - last inserted ID is 0</title> </head> <body> <span style=" font-family:'Courier New'; font-size: 9pt;">Hi,<br> <br> At August 26, 2017, 1:38 AM, Mr. John via Firebird-net-provider wrote:<br> <br> <a name="ydp6aee214eyahoo_quoted_4196587569"></a> </span><table> <tr> <td width=2 bgcolor= #0000ff><br> </td> <td><span style=" font-family:'verdana'; font-size: 10pt;">Hi.<br> Thanks Paul for your answer<br> For my first code I've followed this: https://stackoverflow.com/questions/4068084/how-to-find-an-identity-of-the-last-inserted-row-in-entity-framework<br> and that seems not to apply to FB?</td> </tr> </table> <br> <span style=" font-family:'Courier New'; font-size: 9pt;">That's how I do it. Just make certain that you are using the <span style=" font-size: 10pt;">[DatabaseGenerated(DatabaseGeneratedOption.Identity)] attribute on the ID column in the myTableEnt entity.<br> <br> <br> <span style=" font-family:'calibri'; font-size: 9pt; color: #c0c0c0;"><i>-- <br> Best regards,<br> Daniel Rail<br> Senior Software Developer<br> ACCRA Solutions Inc. (</i></span></span></span><a style=" font-family:'calibri'; font-size: 9pt;" href="http://www.accra.ca">www.accra.ca</a><span style=" font-family:'calibri'; font-size: 9pt; color: #c0c0c0;"><i>)<br> ACCRA Med Software Inc. (</i></span><a style=" font-family:'calibri'; font-size: 9pt;" href="http://www.filopto.com">www.filopto.com</a><span style=" font-family:'calibri'; font-size: 9pt; color: #c0c0c0;"><i>)</body></html> |