Пример #1
0
 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);
     }
 }
Пример #2
0
 public IEnumerable <DogOwner> AddDogOwner(AddDogOwnerDTO ownerToAdd)
 {
     _repo.AddNewDogOwner(ownerToAdd);
     return(_repo.GetAllDogOwners());
 }