Beispiel #1
0
        public IHttpActionResult Search(string razonsocial = null, bool?activo = null)
        {
            try
            {
                var query = new Business.Query.Empresa();

                if (razonsocial != null)
                {
                    query.RazonSocial = (razonsocial, WhereOperator.Like);
                }
                if (activo != null)
                {
                    query.Activo = (activo, WhereOperator.Equals);
                }

                var list = query.List();
                if (list.result.Success)
                {
                    return(Ok(new Business.Table.Empresas().Load(list.domains)?.Datas?.Entities?.List));
                }

                return(InternalServerError());
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }
Beispiel #2
0
        public virtual (Result result, Business.Table.Empresa domain) Empresa_Refresh(int maxdepth = 1, Business.Query.Empresa query = null)
        {
            var refresh = Data.Empresa_Refresh(maxdepth, query?.Data);

            Empresa = new Business.Table.Empresa(refresh.data);

            return(refresh.result, _empresa);
        }