public List <BloodGroupModel> SelectComboBox() { db = new LaboratoriesEntities(); //List<BloodGroupModel> data = db.BloodGroups.Where(i => i.IsActive == true) // .Select(i => new BloodGroupModel // { // Id = i.Id, // Name = i.Name // }).ToList(); //return data; return(null); }
public void Save(AccountBankModel obj) { try { LaboratoriesEntities ent = new LaboratoriesEntities(); AccountBank accBank = new AccountBank(); accBank.Id = obj.Id; accBank.Name = obj.Name; accBank.UserCreate = obj.UserCreate; accBank.DateCreate = obj.DateCreate; accBank.UserModify = obj.UserModify; accBank.DateModify = obj.DateModify; accBank.IsActive = obj.IsActive; ent.AccountBanks.Add(accBank); ent.SaveChanges(); } catch (Exception ex) { throw new ArgumentException(ex.Message.ToString()); } }