public void DeleteGroupBookingComment(int id, int commentid) { Air_GroupBookingComments result = ent.Air_GroupBookingComments.Where(x => x.GroupBookingId == id && x.GroupBookingCommentsId == commentid).FirstOrDefault(); result.isDelete = true; ent.ApplyCurrentValues(result.EntityKey.EntitySetName, result); ent.SaveChanges(); }
public void GroupBookingCommentsAdd(GroupBookingReportModel modelToSave) { Air_GroupBookingComments datamodel = new Air_GroupBookingComments { GroupBookingId = (Int64)modelToSave.GroupBookingId, Comment = modelToSave.PostComment, isDelete = modelToSave.isDelete, CreatedBy = modelToSave.CreatedBy, CreatedDate = DateTime.Now }; ent.AddToAir_GroupBookingComments(datamodel); ent.SaveChanges(); }