public ResponseWrapper<EntityDetailsModel> EntityDetails(int entityId)
 {
     var data = context
         .Entities
         .Single(x => 
             x.EntityId == entityId
         );
     
     var response = 
         new EntityDetailsModel
         {
             EntityId = data.EntityId,
         };
     
     return new ResponseWrapper<EntityDetailsModel>(_validationDictionary, response);
 }
Exemplo n.º 2
0
        public JsonResult GetEntityDetails()
        {
            List <EntityDetailsModel> model = new List <EntityDetailsModel>();

            try
            {
                EntityDetailsModel details = new EntityDetailsModel()
                {
                    EntityId   = "1000",
                    EntityName = string.Empty
                };
                model.Add(details);
            }
            catch (Exception ex)
            {
                LogProvider.ErrorFormat("Controller:{0} Error: {1}", "OfficeDetailsController.GetOfficeDetailsByEntity", ex.ToString());
            }
            return(JsonResult(model, JsonRequestBehavior.AllowGet));
        }