/// <summary> /// Deleting Trashed not forever. /// </summary> /// <returns>returns true or false</returns> public bool DeletNoteForever(int noteId) { try { var note = fundooContext.NoteTable.Where(x => x.NoteId == noteId && x.Trash == true).SingleOrDefault(); if (note != null) { fundooContext.NoteTable.Remove(note); fundooContext.SaveChangesAsync(); return(true); } else { return(false); } } catch (Exception ex) { throw new Exception(ex.Message); } }
/// <summary> /// Delet Collaborator /// </summary> /// <param name="id">Collaborator ID</param> /// <returns></returns> public bool DeleteCollaborator(int id) { try { var userData = fundooContext.CollaboratorTable.Where(x => x.CallId == id).SingleOrDefault(); if (userData != null) { fundooContext.CollaboratorTable.Remove(userData); fundooContext.SaveChangesAsync(); return(true); } else { return(false); } } catch (Exception ex) { throw new Exception(ex.Message); } }