Example #1
0
        public int Add(ViewModels.Dog dog)
        {
            data.Entities.Dog tmp = mapperout.Map <ViewModels.Dog, data.Entities.Dog>(dog);
            int id = repository.AddAsync(tmp).Result;

            return(id);
        }
Example #2
0
 public void Set(data.Entities.Dog dog)
 {
     context.Dogs.Add(dog);
     context.SaveChanges();
 }