public IHttpActionResult Get()
        {
            AjaxResult <IQueryable <Company> > result = new AjaxResult <IQueryable <Company> >();

            result.data = _CompanyDAL.Get();
            return(Json(result));
        }
Example #2
0
        public CompanyDTO GetCompanyById(int Id)
        {
            Company company = new Company();

            company = companyDAL.Get(Id);
            CompanyDTO companyDTO = new CompanyDTO();

            companyDTO.Id   = company.Id;
            companyDTO.Name = company.Name;
            companyDTO.OrganizationalForm = company.OrganizationalForm;
            companyDTO.Size = company.Size;
            return(companyDTO);
        }