using Csla;
using System;

namespace SyncfusionSchedulerDeleteBug.Business
{
    [Serializable]
    public class BusinessBaseModel<T> : BusinessBase<T> where T:BusinessBase<T>
    {
        public string Title
        {
            get 
            {
                string className = this.GetType().Name;
                Char[] myChar = { 'E','d','i','t' };
                string newClassName = className.Trim(myChar);

                if (IsNew)
                {
                    return $"{newClassName} - Create";
                }
                else
                {
                    return $"{newClassName} - Edit ({ToString()})";
                }
            }
        }
    }
}
