public Enum.EntityResult RegisterView(View model)
 {
     try
     {
         _db.Views.Add(model);
         _db.SaveChanges();
         return Enum.EntityResult.Success;
     }
     catch (Exception e)
     {
         return Enum.EntityResult.Failed;
     }
 }
        public bool RegisterView(View model)
        {
            if (!ModelState.IsValid)
            {
                this.AddToastMessage("", "Alanları Kontrol Ediniz", Enum.ToastrType.Warning);
                return false;
            }
            var res = _repository.RegisterView(model);
            if (res == Enum.EntityResult.Success)
            {
                this.AddToastMessage("", "View Kaydedildi", Enum.ToastrType.Success);
                return true;

            }
            else
            {
                this.AddToastMessage("", "View Kaydedilirken Hata", Enum.ToastrType.Error);
                return false;
            }
        }