public int insertRecord(string FName, string EmailId, string PhoneNumb, string Address, string CuntryCode, string commnts) { using (var cont = new ROPAEntities()) { var obj = new FeedBackForm{ FirstName = FName, EmailId = EmailId, PhoneNumber = PhoneNumb, Addres = Address, countrycode = CuntryCode, Commments = commnts, insertDate = DateTime.Now }; cont.AddToFeedBackForms(obj); int result = cont.SaveChanges(); return result; } }
public int insertRecord(string FName, string EmailId, string PhoneNumb, string Address, string CuntryCode, string commnts) { int result = 0; using (ROPAEntities cont = new ROPAEntities()) { FeedBackForm obj = new FeedBackForm(); obj.FirstName = FName; obj.EmailId = EmailId; obj.PhoneNumber = PhoneNumb; obj.Addres = Address; obj.countrycode = CuntryCode; obj.Commments = commnts; obj.insertDate = DateTime.Now; cont.AddToFeedBackForms(obj); result = cont.SaveChanges(); return result; } }