public void DeleteComment(int id, int commentid) { Core_PhoneCallLogComments result = ent.Core_PhoneCallLogComments.Where(x => x.PhoneCallLogId == id && x.PhoneCallLogCommentId == commentid).FirstOrDefault(); var comment = result.Comment; result.isDelete = true; ent.ApplyCurrentValues(result.EntityKey.EntitySetName, result); ent.SaveChanges(); }
public void CommentsAdd(AgentCallLogModel modelToSave) { Core_PhoneCallLogComments datamodel = new Core_PhoneCallLogComments { PhoneCallLogId = modelToSave.PhoneCallLogId, Comment = modelToSave.Comment, isDelete = modelToSave.isDelete, CreatedBy = modelToSave.CreatedBy, CreatedDate = DateTime.Now }; ent.AddToCore_PhoneCallLogComments(datamodel); ent.SaveChanges(); }