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); }
public void Set(data.Entities.Dog dog) { context.Dogs.Add(dog); context.SaveChanges(); }