示例#1
0
 public bool Add(Person person)
 {
     try
     {
         Seller seller = new Seller()
         {
             FirstName = person.FirstName,
             LastName  = person.LastName,
             Email     = person.Email,
             Password  = person.Password,
             Address   = new Address()
             {
                 CityId = person.CityId
             }
         };
         _sellerRepository.Add(seller);
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
示例#2
0
 public void Post([FromBody] Seller value)
 {
     _repository.Add(value);
 }
示例#3
0
 public Response Post([FromBody] Seller value)
 {
     return(repo.Add(value));
 }