public IUserIdentifier Read(Guid id) { using (FilkioCrmContext db = new FilkioCrmContext()) { UserIdentifierEntity itemToRead = db.UserIdentifiers.Where(i => i.Id == id).FirstOrDefault(); return(itemToRead); } }
public void Update(IUserIdentifier item, Guid id) { using (FilkioCrmContext db = new FilkioCrmContext()) { UserIdentifierEntity itemToUpdate = db.UserIdentifiers.Where(i => i.Id == id).FirstOrDefault(); itemToUpdate.Update(item); db.SaveChanges(); } }
public void Delete(Guid id) { using (FilkioCrmContext db = new FilkioCrmContext()) { UserIdentifierEntity itemToDelete = db.UserIdentifiers.Where(i => i.Id == id).FirstOrDefault(); db.Remove(itemToDelete); db.SaveChanges(); } }
public void Create(IUserIdentifier item) { using (FilkioCrmContext db = new FilkioCrmContext()) { UserIdentifierEntity itemToAdd = new UserIdentifierEntity(item); db.UserIdentifiers.Add(itemToAdd); db.SaveChanges(); } }