EntityNotExistsException.cs 701 B

12345678910111213141516171819
  1. using System;
  2. using Quadarax.Foundation.Core.Exceptions;
  3. namespace BO.AppServer.Business.Exceptions
  4. {
  5. public class EntityNotExistsException : CodeException
  6. {
  7. private const string CS_MESSAGE = "Entity '{0}' named '{1}' [{2}] not exists in database.";
  8. private const int CN_CODE = 1001;
  9. public EntityNotExistsException(Type entityType, string name,long id, Exception innerException) : base(CN_CODE, string.Format(CS_MESSAGE, entityType.Name, name, id), innerException)
  10. {
  11. }
  12. public EntityNotExistsException(Type entityType, string name, long id) : base(CN_CODE, string.Format(CS_MESSAGE, entityType.Name, name, id))
  13. {
  14. }
  15. }
  16. }