Exemple #1
0
 public static Lunch ToEntity(this LunchContract lunch)
 {
     return(new Lunch
     {
         Id = lunch.Id,
         LunchTime = lunch.LunchTime,
         RestaurantId = lunch.RestaurantId,
         Employees = lunch.Employees?.ToEntities(),
         Restaurant = lunch.Restaurant?.ToEntity(),
     });
 }
Exemple #2
0
 public IHttpActionResult Post(LunchContract lunchContract)
 {
     return(_lunchHandler.Post(lunchContract) ? (IHttpActionResult)Ok() : BadRequest());
 }
Exemple #3
0
 public bool Post(LunchContract lunchContract)
 {
     return(_uow.LunchRepository.CreateOrUpdate(lunchContract.ToEntity()));
 }