EntityAlreadyExistsException.cs 686 B

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