コード例 #1
0
 public IUserIdentifier Read(Guid id)
 {
     using (FilkioCrmContext db = new FilkioCrmContext())
     {
         UserIdentifierEntity itemToRead = db.UserIdentifiers.Where(i => i.Id == id).FirstOrDefault();
         return(itemToRead);
     }
 }
コード例 #2
0
 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();
     }
 }
コード例 #3
0
 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();
     }
 }
コード例 #4
0
 public void Create(IUserIdentifier item)
 {
     using (FilkioCrmContext db = new FilkioCrmContext())
     {
         UserIdentifierEntity itemToAdd = new UserIdentifierEntity(item);
         db.UserIdentifiers.Add(itemToAdd);
         db.SaveChanges();
     }
 }