public JsonResult Remove(string name) { var resto = _restoransRepository.GetByName(name); if (resto == null) { return(Json(false)); } _restoransRepository.Remove(resto); return(Json(true)); }
public BronResto BronR(BronViewModel model) { var restmod = _restoransRepository.GetByName(model.Name); var bronrestModel = MapResto.Map <BronResto>(model); bronrestModel.Restoranses = restmod; bronrestModel.BronRespNumber = NewBronRespNumber(); return(bronrestModel); }