public void Remove(ConfigHairSize item) { if (item != null) { control.Remove(item); control.SaveChanges(); } else { throw new Exception("This item not found in DataBase"); } }
public ConfigHairSize Get(int id) { ConfigHairSize temp = control.GetAll().FirstOrDefault(x => x.Id == id); if (temp != null) { return(temp); } else { throw new Exception("Not Found Gender in DataBase"); } }
public ConfigHairSize Add(ConfigHairSize item) { ConfigHairSize temp = null; if (temp == null) { temp = control.Add(item); control.SaveChanges(); return(temp); } else { throw new Exception("This Gender alredy in base"); } }
public void Remove(ConfigHairSize item) { context.ConfHairSizes.Remove(item); }
public ConfigHairSize Add(ConfigHairSize item) { return(context.ConfHairSizes.Add(item)); }