Exemple #1
0
 public static Responses.JsonResponse EXCEPCION(System.Data.Entity.Validation.DbEntityValidationException pEntityException)
 {
     return(EXCEPCION(pEntityException.GetEntityExceptionMessage()));
 }
Exemple #2
0
        /// <summary>
        /// Get TempDataDictionary with database entity exception messages
        /// </summary>
        /// <param name="pE">DbEntityValidationException</param>
        /// <returns>TempDataDictionary</returns>
        public TempDataDictionary TempDataEntityExceptionMessage(System.Data.Entity.Validation.DbEntityValidationException pE)
        {
            TempDataDictionary vError = new TempDataDictionary();

            vError["error"]         = Titiushko.Utilities.Constants.Basic.TRUE;
            vError["error_message"] = Titiushko.Utilities.Constants.Errors.BaseError.DEFAULT(pE.GetEntityExceptionMessage());
            return(vError);
        }