/// <summary> /// Create multiple owners /// </summary> public bool CreateOwners(IEnumerable <Owner> newOwners) { if (newOwners.All(o => OwnerRules.VerifyInsert(o))) { _DB.Owners.AddRange(newOwners); return(_DB.SaveChanges() != 0); } else { return(false); } }
/// <summary> /// Inserts an Owner into the database /// </summary> public bool CreateOwner(Owner newOwner) { if (OwnerRules.VerifyInsert(newOwner)) { _DB.Owners.Add(newOwner); return(_DB.SaveChanges() != 0); } else { return(false); } }