Ejemplo n.º 1
0
        protected virtual Expected <T> GetEntityById(K id)
        {
            var entityService = _service;

            var entity = entityService.GetById(id);

            if (entity == default(T))
            {
                return(Expected <T> .ErrorFormat(DALErrorCode.EntityNotFound, "{0} with id '{1}' was not found.", typeof(T).Name, id));
            }

            return(entity);
        }