public Business Add(Business business) { BusinessEN businessEN = new BusinessEN(); businessEN.Name = business.Name; businessEN.Category = new CategoryEN(); businessEN.Category.ID = business.CategoryId; businessEN.User = new UserEN(); businessEN.User.ID = business.UserId; businessEN.Description = business.Description; businessEN.Latitude = business.Latitude; businessEN.Longitude = business.Longitude; businessEN.Currency = business.Currency; businessEN.Price = business.Price; ContactsEN contactsEN = new ContactsEN(); contactsEN.Business = businessEN; contactsEN.Phonenumber = business.Phonenumber; contactsEN.EmailID = business.EmailID; contactsEN.Address = business.Address; BusinessBiz biz = new BusinessBiz(); businessEN = biz.Add(businessEN, contactsEN); business.ID = businessEN.ID; return business; }
public List<BusinessEN> Search(Business business) { BusinessBiz biz = new BusinessBiz(); return biz.GetByGeo(business.Latitude, business.Longitude); }