public bool AddNewDogOwner(AddDogOwnerDTO ownerToAdd) { using (var db = new SqlConnection(_connectionString)) { var sql = @"INSERT INTO[dbo].[DogOwner] ([Email]) VALUES (@email)"; return(db.Execute(sql, ownerToAdd) == 1); } }
public IEnumerable <DogOwner> AddDogOwner(AddDogOwnerDTO ownerToAdd) { _repo.AddNewDogOwner(ownerToAdd); return(_repo.GetAllDogOwners()); }