Insert Update using Nhibernate
- by Pankaj
Hello All
I am inserting Product on database, My Product Model like this
public class Product
{
public int ProductID { get; set; }
public string ProductNumber { get; set; }
public string Description { get; set; }
public string KeyWords { get; set; }
}
here my ProductNumber is coming on counter table
Table- Counter
Field- Counter- int
when product insert then its ProductNumber come from Counter table, after insert counter increase 1. In update counter not increase.
How can i insert Product in such situation using Nhibernate?
Thanks