Example #1
0
 public void Delete(DeviceProperty entity)
 {
     if (entity == null)
     {
         throw new ArgumentNullException("entity");
     }
     context.DeviceProperties.Remove(entity);
     context.SaveChanges();
 }
 //public T Get(long id)
 //{
 //    // return entities.SingleOrDefault(s => s.Id == id);
 //}
 public void Insert(T entity)
 {
     if (entity == null)
     {
         throw new ArgumentNullException("entity");
     }
     entities.Add(entity);
     context.SaveChanges();
 }