Index: PostgreSqlDotnetCore/Controllers/BlogController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/BlogController.cs	(revision a3ce071e97bad04f989c769589a31427febe9ff3)
+++ PostgreSqlDotnetCore/Controllers/BlogController.cs	(revision 2aea0fddc0f6d0c25f0d44044eeb2ec5930012b9)
@@ -11,72 +11,19 @@
     {
         public BlogController(UserManager<IdentityUser> userManager) : base(userManager)
-
-        {
-
+        {
         }
 
         // GET: Customer
-        /* public async Task<ActionResult> IndexAsync()
-         {
-             // check for permission
-             bool isAuthenticated = User.Identity.IsAuthenticated;
-             if (!isAuthenticated)
-             {
-                 return RedirectToAction("AccessDenied", "Error");
-             }
-             //return View(Enumerable.Empty<UsersClass>());
-             return View(db.BlogPostControllerObj.ToList());
-         }
-        */
-
-        /* public async Task<ActionResult> Index()
-         {
-             // Проверка за автентикација
-             bool isAuthenticated = User.Identity.IsAuthenticated;
-
-             if (!isAuthenticated)
-             {
-                 return RedirectToAction("AccessDenied", "Error");
-             }
-
-             // Список на блог постови
-             var blogPosts = await db.BlogPostControllerObj.ToListAsync();
-
-             // Предавање на ViewBag за проверка на автентикација
-             ViewBag.isAuthenticated = isAuthenticated;
-
-             return View(blogPosts);
-         }*/
-
-        public async Task<ActionResult> Index()
-        {
-            // Проверка за автентикација
+        public async Task<ActionResult> IndexAsync()
+        {
+            // check for permission
             bool isAuthenticated = User.Identity.IsAuthenticated;
-
             if (!isAuthenticated)
             {
                 return RedirectToAction("AccessDenied", "Error");
             }
-
-            // Список на блог постови
-            var blogPosts = await db.BlogUsers.ToListAsync();
-
-            // Вземи тековниот корисник
-            var currentUser = await _userManager.GetUserAsync(User);
-            var customerClass = await db.CustomerObj.SingleOrDefaultAsync(x => x.email == currentUser.Email);
-
-            // Предавање на ViewBag за проверка на автентикација и корисничкиот ID
-            ViewBag.isAuthenticated = isAuthenticated;
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
-            ViewBag.CurrentUserId = customerClass?.id;
-
-            return View(blogPosts);
-        }
-
-
-
-
+            //return View(Enumerable.Empty<UsersClass>());
+            return View(db.BlogPostControllerObj.ToList());
+        }
 
         // GET: Customer/Details/5
@@ -89,6 +36,4 @@
             }
             BlogPostConsultation blogClass = db.BlogPostControllerObj.Find(id);
-            UsersClass customerClass = await getCrrentUser();
-            ViewBag.isAuthenticated = customerClass;
             if (blogClass == null)
             {
@@ -99,11 +44,9 @@
             // query
             var query = from st in db.BlogPostAnswersObj
-                        where st.BlogPostConsultationid == blogClass.id
+                        where st.blogpostconsultationid == blogClass.id
                         select st;
             //elenaaa
             var blogAnswers = query.ToList();
             blogClass.BlogPostAnswers = blogAnswers;
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-            ViewBag.CurrentUserId = customerClass?.id;
             return View(blogClass);
         }
@@ -115,22 +58,13 @@
         //}
 
-        /* public ActionResult Create()
-         {
-             var model = new BlogPostConsultation();
-             return View(model);
-         }*/
-
-        public async Task<ActionResult> CreateAsync()
-        {
-
-            // check for permission
-            //UsersClass customerClass = await checkAuthorizationAsync();
-           // ViewBag.isAuthenticated = await getCrrentUser();
-           UsersClass customerClass = await getCrrentUser();
-            // set if is authenticated
-            ViewBag.isAuthenticated = customerClass;
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
-            return View();
+        public ActionResult Create()
+        {
+            var model = new BlogPostConsultation
+            {
+                //date_askes = DateTime.Now // Поставете го датумот на моменталниот датум
+                // date_askes= DateTime.UtcNow.Date
+                date_askes = DateOnly.FromDateTime(DateTime.UtcNow.Date)
+            };
+            return View(model);
         }
 
@@ -149,17 +83,11 @@
                     var user = await _userManager.GetUserAsync(User);
                     var customerClass = db.CustomerObj.SingleOrDefault(x => x.email == user.Email);
-                   //dodadeno na 25.08
-                    ViewBag.isAuthenticated = await getCrrentUser();
-                    if (customerClass != null)
-                    {
-                        // Поставете users_id на идентификаторот на корисникот
-                        blogClass.users_id = customerClass.id;
-                        //blogClass.date_askes = DateOnly.FromDateTime(DateTime.UtcNow); 
-                        blogClass.date_askes = DateOnly.FromDateTime(DateTime.Now); // Ова ќе стави локално време
-
-                        db.BlogPostControllerObj.Add(blogClass);
-                        await db.SaveChangesAsync();
-                        return RedirectToAction("Index");
-                    }
+                    // blogClass.date_askes = new DateTime();
+                    // blogClass.date_askes = DateTime.UtcNow;
+                    blogClass.date_askes = DateOnly.FromDateTime(DateTime.UtcNow);
+                    blogClass.users_id = customerClass.id;
+                    db.BlogPostControllerObj.Add(blogClass);
+                    db.SaveChanges();
+                return RedirectToAction("Index");
                 }
                 else
@@ -171,10 +99,4 @@
             return View(blogClass);
         }
-
-
-
-
-
-
 
         // GET: Customer/Edit/5
@@ -192,9 +114,6 @@
             }
 
-            // izbriseno na 26.08
-           UsersClass customerClass = await checkAuthorizationAsync();
-            //dodadeno na 26.08
-           // UsersClass customerClass = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin);
-            ViewBag.isAuthenticated = await getCrrentUser();
+            // check for permission
+            UsersClass customerClass = await checkAuthorizationAsync();
             if (customerClass == null)
             {
@@ -211,8 +130,4 @@
                 }
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-            ViewBag.OnlyAdminManager1 = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
 
             return View(blogClass);
@@ -224,56 +139,28 @@
         [HttpPost]
         [ValidateAntiForgeryToken]
-        /* public ActionResult Edit([Bind(include: "id,date_askes,title,description,users_id")] BlogPostConsultation blogClass)
-         {
-             if (ModelState.IsValid)
-             {
-                 db.Entry(blogClass).State = EntityState.Modified;
-                 db.SaveChanges();
-                 return RedirectToAction("Index");
-             }
-             return View(blogClass);
-         }*/
-
-
-        public async Task<ActionResult> EditAsync(int id, [Bind(include: "id,date_askes,title,description")] BlogPostConsultation blogClass)
+        public ActionResult Edit([Bind(include: "id,date_askes,title,description,users_id")] BlogPostConsultation blogClass)
         {
             if (ModelState.IsValid)
             {
-                var existingBlogClass = await db.BlogPostControllerObj.FindAsync(id);
-                if (existingBlogClass != null)
-                {
-                    
-
-                    // Запамтете ја старата вредност на users_id
-                    blogClass.users_id = existingBlogClass.users_id;
-
-                    db.Entry(existingBlogClass).CurrentValues.SetValues(blogClass);
-                    await db.SaveChangesAsync();
-                    return RedirectToAction("Index");
-                }
-            }
-            return View(blogClass);
-        }
-
-
+                db.Entry(blogClass).State = EntityState.Modified;
+                db.SaveChanges();
+                return RedirectToAction("Index");
+            }
+            return View(blogClass);
+        }
 
         // GET: Customer/Delete/5
-        
         public async Task<ActionResult> DeleteAsync(int? id)
-        {
-            //  UsersClass customerClass = await checkAuthorizationAsync();
-
-            ViewBag.isAuthenticated = await getCrrentUser();
-
+        { 
             if (id == null)
+           {
+               return View(null);
+              //return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
+            }
+           BlogPostConsultation blogClass = db.BlogPostControllerObj.Find(id);
+            if (blogClass == null)
             {
                 return View(null);
-                //return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
-            }
-            BlogPostConsultation blogClass = db.BlogPostControllerObj.Find(id);
-            if (blogClass == null)
-            {
-                return View(null);
-                //return HttpNotFound();
+               //return HttpNotFound();
             }
             // check for permission
@@ -293,24 +180,9 @@
                 }
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
-            return View(blogClass);
-        }
-
+            return View(blogClass);
+        }
 
         // POST: Customer/Delete/5
-
-        /*
-                [HttpPost, ActionName("Delete")]
-                [ValidateAntiForgeryToken]
-                public ActionResult DeleteConfirmed(int id)
-                {
-                    BlogPostConsultation blogClass = db.BlogPostControllerObj.Find(id);
-                    db.BlogPostControllerObj.Remove(blogClass);
-                    db.SaveChanges();
-                    return RedirectToAction("Index");
-                }
-                */
+     
 
         [HttpPost, ActionName("Delete")]
@@ -318,41 +190,9 @@
         public ActionResult DeleteConfirmed(int id)
         {
-            // Наоѓање на објектот по ID
             BlogPostConsultation blogClass = db.BlogPostControllerObj.Find(id);
-
-            // Проверка дали објектот е пронајден
-            if (blogClass == null)
-            {
-                // Ако објектот не е пронајден, враќаме 404 Not Found или друга соодветна акција
-                return View(null);
-            }
-            //  prvo izbrisi gi site odgovori po sot BlogId e primaren kluc vo drugata tabela
-
-            // query
-            var query = from st in db.BlogPostAnswersObj
-                        where st.BlogPostConsultationid == blogClass.id
-                        select st;
-            //elenaaa
-            var blogAnswers = query.ToList();
-            foreach (BlogPostAnswers answerClass in blogAnswers)
-            {
-                db.BlogPostAnswersObj.Remove(answerClass);
-                db.SaveChanges();
-
-            }
-
-            // Отстранување на објектот ако е пронајден
             db.BlogPostControllerObj.Remove(blogClass);
             db.SaveChanges();
-
-            // Пренасочување на корисникот кон Index страницата
             return RedirectToAction("Index");
         }
-
-        // GET: Customer/Delete/5
-        // GET: Customer/Delete/5
-        // GET: Customer/Delete/5
-
-
 
         protected override void Dispose(bool disposing)
Index: PostgreSqlDotnetCore/Controllers/BlogPostAnswersController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/BlogPostAnswersController.cs	(revision a3ce071e97bad04f989c769589a31427febe9ff3)
+++ PostgreSqlDotnetCore/Controllers/BlogPostAnswersController.cs	(revision 2aea0fddc0f6d0c25f0d44044eeb2ec5930012b9)
@@ -14,22 +14,12 @@
 
         // GET: Customer
-        //public ActionResult Index()
-         public async Task<ActionResult> IndexAsync()
-         {
-             //return View(Enumerable.Empty<UsersClass>());
-             UsersClass customerClass = await getCrrentUser();
-
-             // set if is authenticated
-             ViewBag.isAuthenticated = customerClass;
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
+        public ActionResult Index()
+        {
+            //return View(Enumerable.Empty<UsersClass>());
             return View(db.BlogPostAnswersObj.ToList());
         }
 
-
-
-
         // GET: Customer/Details/5
-        // public ActionResult Details(int? id)
-        public async Task<ActionResult> Details(int? id)
+        public ActionResult Details(int? id)
         {
             if (id == null)
@@ -37,6 +27,4 @@
                 return RedirectToAction("NotExist", "Error");
             }
-            UsersClass customerClass = await getCrrentUser(); // Добијте ја тековната улога на корисникот
-            ViewBag.isAuthenticated = customerClass;
             BlogPostAnswers answerClass = db.BlogPostAnswersObj.Find(id);
             if (answerClass == null)
@@ -44,15 +32,4 @@
                 return RedirectToAction("NotExist", "Error");
             }
-
-
-            // query
-            var query = from st in db.BlogPostAnswersObj
-                        where st.parent_id == answerClass.id
-                        select st;
-            //elenaaa
-            var answersUnderA = query.Where(x => x.id != answerClass.id).ToList();
-
-            answerClass.blogPostAnswers = answersUnderA;
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
             return View(answerClass);
         }
@@ -69,12 +46,8 @@
             // check for permission
             UsersClass customerClass = await checkAuthorizationAsync();
-           // UsersClass customerClass = await getCrrentUser();
-            // set if is authenticated
-            ViewBag.isAuthenticated = customerClass;
             if (customerClass == null)
             {
                 return RedirectToAction("AccessDenied", "Error");
             }
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
             return View();
         }
@@ -85,37 +58,12 @@
         [HttpPost]
         [ValidateAntiForgeryToken]
-        public async Task<ActionResult> CreateAsync(int? id, int? parentId, [Bind(include: "reply")] BlogPostAnswers answerClass)
+        public ActionResult Create([Bind(include: "id,parent_id,reply,root_post,usersID")] BlogPostAnswers answerClass)
         {
-
-            //string id = Request.Query["BlogId"];
-            if (id == null && id > 0)
+            if (ModelState.IsValid)
             {
-                return RedirectToAction("NotExist", "Error");
-            }
-            //string id = Request.Query["BlogId"];
-            if (parentId== null && parentId > 0)
-            {
-                return RedirectToAction("NotExist", "Error");
-            }
-            if (answerClass != null && answerClass.reply.Length > 0)
-            {
-
-                var user = await _userManager.GetUserAsync(User);
-                if (user == null)
-                {
-                    return RedirectToAction("AccessDenied", "Error");
-                }
-
-
-                var customerClass = db.CustomerObj.SingleOrDefault(x => x.email == user.Email);
-                answerClass.usersid = customerClass.id;
-                answerClass.BlogPostConsultationid = (int)id;
-                answerClass.parent_id = (int)parentId;
                 db.BlogPostAnswersObj.Add(answerClass);
                 db.SaveChanges();
-                //return RedirectToAction("Index");
-                return RedirectToAction("Details", "Blog", new { id });
+                return RedirectToAction("Index");
             }
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
 
             return View(answerClass);
@@ -155,17 +103,11 @@
         public ActionResult Edit([Bind(include: "id,parent_id,reply,root_post,usersID")] BlogPostAnswers answerClass)
         {
-
-            BlogPostAnswers answerClassDB = db.BlogPostAnswersObj.Find(answerClass.id);
-            if (answerClassDB != null && !answerClassDB.reply.Equals(answerClass.reply))
+            if (ModelState.IsValid)
             {
-                answerClassDB.reply = answerClass.reply;
-                answerClassDB.parent_id = answerClass.parent_id;
-                db.Entry(answerClassDB).State = EntityState.Modified;
+                db.Entry(answerClass).State = EntityState.Modified;
                 db.SaveChanges();
-                //return RedirectToAction("Index");
-                int id = answerClassDB.BlogPostConsultationid;
-                return RedirectToAction("Details", "Blog", new { id });
+                return RedirectToAction("Index");
             }
-            return View(answerClassDB);
+            return View(answerClass);
         }
 
@@ -173,5 +115,4 @@
         public async Task<ActionResult> DeleteAsync(int? id)
         {
-          
             if (id == null)
             {
@@ -194,6 +135,5 @@
                 }
             }
-            // return View(answerClass);
-             return View(answerClass);
+            return View(answerClass);
         }
 
Index: PostgreSqlDotnetCore/Controllers/CityController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/CityController.cs	(revision a3ce071e97bad04f989c769589a31427febe9ff3)
+++ PostgreSqlDotnetCore/Controllers/CityController.cs	(revision 2aea0fddc0f6d0c25f0d44044eeb2ec5930012b9)
@@ -19,39 +19,14 @@
             // check for permission
             UsersClass customerClass = await checkAuthorizationAsync();
-            ViewBag.isAuthenticated = User.Identity.IsAuthenticated;
-
             if (customerClass == null)
             {
                 return RedirectToAction("AccessDenied", "Error");
             }
-
-            var citiess = await db.CitiesObj.ToListAsync();
-            // проба на 23.08
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
-            return View(citiess);
+            //return View(Enumerable.Empty<UsersClass>());
+            return View(db.CitiesObj.ToList());
         }
 
-
-
-
-        /* public async Task<ActionResult> IndexAsync()
-         {
-             // check for permission
-             UsersClass customerClass = await checkAuthorizationAsync();
-             if (customerClass == null)
-             {
-                 return RedirectToAction("AccessDenied", "Error");
-             }
-             //return View(Enumerable.Empty<UsersClass>());
-             return View(db.CitiesObj.ToList());
-         }
-        */
-
-
-
         // GET: Customer/Details/5
-        //public ActionResult Details(int? id)
-        public async Task<ActionResult> Details(int? id)
+        public ActionResult Details(int? id)
         {
             if (id == null)
@@ -60,13 +35,8 @@
             }
             CitiesClass cityClass = db.CitiesObj.Find(id);
-            UsersClass customerClass = await getCrrentUser();
-            ViewBag.isAuthenticated = customerClass;
             if (cityClass == null)
             {
                 return RedirectToAction("NotExist", "Error");
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             return View(cityClass);
         }
@@ -78,11 +48,7 @@
         //}
 
-        //public ActionResult Create()
-        public async Task<ActionResult> CreateAsync()
+        public ActionResult Create()
         {
-            UsersClass customerClass = await getCrrentUser();
-            // set if is authenticated
-            ViewBag.isAuthenticated = customerClass;
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
+            
             return View();
         }
@@ -95,5 +61,4 @@
         public ActionResult Create([Bind(include: "id,name")] CitiesClass cityClass)
         {
-
             if (ModelState.IsValid)
             {
@@ -107,6 +72,5 @@
 
         // GET: Customer/Edit/5
-        //  public ActionResult Edit(int? id)
-        public async Task<ActionResult> Edit(int? id)
+        public ActionResult Edit(int? id)
         {
             if (id == null)
@@ -115,13 +79,8 @@
             }
             CitiesClass cityClass = db.CitiesObj.Find(id);
-            //22.08
-            ViewBag.isAuthenticated = await getCrrentUser();
             if (cityClass == null)
             {
                 return RedirectToAction("NotExist", "Error");
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             return View(cityClass);
         }
@@ -144,11 +103,6 @@
 
         // GET: Customer/Delete/5
-        // public ActionResult Delete(int? id)
-        public async Task<ActionResult> Delete(int? id)
+        public ActionResult Delete(int? id)
         {
-
-            UsersClass customerClass = await checkAuthorizationAsync();
-
-            ViewBag.isAuthenticated = await getCrrentUser();
             if (id == null)
             {
@@ -160,7 +114,4 @@
                 return RedirectToAction("NotExist", "Error");
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             return View(cityClass);
         }
@@ -185,8 +136,4 @@
             base.Dispose(disposing);
         }
-
-
-
-
     }
 }
Index: PostgreSqlDotnetCore/Controllers/CustomerController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/CustomerController.cs	(revision a3ce071e97bad04f989c769589a31427febe9ff3)
+++ PostgreSqlDotnetCore/Controllers/CustomerController.cs	(revision 2aea0fddc0f6d0c25f0d44044eeb2ec5930012b9)
@@ -19,11 +19,5 @@
         public async Task<ActionResult> IndexAsync()
         {
-           UsersClass customerClass = await getCrrentUser();
-           
-            ViewBag.isAuthenticated = User.Identity.IsAuthenticated;
-            ViewBag.CanCreate = customerClass.role_id == RoleConstants.Admin || customerClass.role_id == RoleConstants.Manager;
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
+            UsersClass customerClass = await getCrrentUser();
             if (customerClass == null)
             {
@@ -32,5 +26,4 @@
             if (customerClass.role_id == RoleConstants.Standard)
             {
-                // searching from DB 
                 
                 var query = from st in db.CustomerObj
@@ -47,6 +40,5 @@
                 return View(db.CustomerObj.ToList());
             }
-
-
+          
         }
 
@@ -64,5 +56,4 @@
             // check for permission
             UsersClass customerClass = await getCrrentUser();
-            ViewBag.isAuthenticated = customerClass;
             if (customerClass == null)
             {
@@ -75,7 +66,4 @@
                 return RedirectToAction("NotExist", "Error");
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             return View(customerClass);
         }
@@ -84,17 +72,10 @@
         public async Task<ActionResult> CreateAsync()
         {
-            //ViewBag.CanCreate = customerClass.role_id == RoleConstants.Admin || customerClass.role_id == RoleConstants.Manager;
-
             // check for permission
-            UsersClass customerClass = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-            //dodano na 23.08
-            ViewBag.isAuthenticated = await getCrrentUser();
+            UsersClass customerClass = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin);
             if (customerClass == null)
             {
                 return RedirectToAction("AccessDenied", "Error");
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
 
             return View();
@@ -143,5 +124,4 @@
 
             customerClass = db.CustomerObj.Find(id);
-            ViewBag.isAuthenticated = await getCrrentUser();
             if (customerClass == null)
             {
@@ -149,7 +129,4 @@
                 //return HttpNotFound();
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             return View(customerClass);
         }
@@ -181,12 +158,8 @@
             }
             UsersClass customerClass = await getCrrentUser();
-            ViewBag.isAuthenticated = await getCrrentUser();
             if (customerClass == null)
             {
                 return RedirectToAction("AccessDenied", "Error");
             }
-            
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
             return View(customerClass);
         }
Index: PostgreSqlDotnetCore/Controllers/ErrorController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/ErrorController.cs	(revision a3ce071e97bad04f989c769589a31427febe9ff3)
+++ PostgreSqlDotnetCore/Controllers/ErrorController.cs	(revision 2aea0fddc0f6d0c25f0d44044eeb2ec5930012b9)
@@ -2,33 +2,16 @@
 {
     using Microsoft.AspNetCore.Http;
-    using Microsoft.AspNetCore.Identity;
     using Microsoft.AspNetCore.Mvc;
-    using PostgreSqlDotnetCore.Models;
-    using System.Threading.Tasks;
 
-    public class ErrorController : BaseController
+    public class ErrorController : Controller
     {
-        public ErrorController(UserManager<IdentityUser> userManager) : base(userManager)
+        // GET: ErrorController
+        public IActionResult AccessDenied()
         {
-
-        }
-        // GET: ErrorController
-        public async Task<IActionResult> AccessDeniedAsync()
-        {
-            // set if is authenticated
-            ViewBag.isAuthenticated = await getCrrentUser();
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             return View();
         }
         // GET: ErrorController
-        public async Task<IActionResult> NotExistAsync()
+        public IActionResult NotExist()
         {
-            // set if is authenticated
-            ViewBag.isAuthenticated = await getCrrentUser();
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             return View();
         }
Index: PostgreSqlDotnetCore/Controllers/HomeController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/HomeController.cs	(revision a3ce071e97bad04f989c769589a31427febe9ff3)
+++ PostgreSqlDotnetCore/Controllers/HomeController.cs	(revision 2aea0fddc0f6d0c25f0d44044eeb2ec5930012b9)
@@ -1,14 +1,12 @@
 ﻿using Microsoft.AspNetCore.Identity;
 using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
 using PostgreSqlDotnetCore.Data;
 using PostgreSqlDotnetCore.Models;
 using System.Diagnostics;
-using System.Web.Mvc;
 
 namespace PostgreSqlDotnetCore.Controllers
 {
 
-    public class HomeController : BaseController
+    public class HomeController : Controller
     {
         private ApplicationDbContext db = new ApplicationDbContext();
@@ -17,5 +15,5 @@
         private readonly ILogger<HomeController> _logger;
 
-        public HomeController(ILogger<HomeController> logger, UserManager<IdentityUser> userManager) : base(userManager)
+        public HomeController(ILogger<HomeController> logger, UserManager<IdentityUser> userManager)
         {
             _logger = logger;
@@ -31,5 +29,5 @@
                 if (user != null)
                 {
-                    UsersClass customerClass = db.CustomerObj.SingleOrDefault(x => x.email == user.Email);
+                    UsersClass customerClass = db.CustomerObj.SingleOrDefault(x=> x.email == user.Email);
                     if (customerClass == null)
                     {
@@ -44,7 +42,5 @@
                                 lastName = nameLastName[0].Split('.')[1];
                             }
-                        }
-                        catch (Exception ex)
-                        {
+                        } catch(Exception ex) { 
                         }
                         db.CustomerObj.Add(new UsersClass(
@@ -60,44 +56,18 @@
                         db.SaveChanges();
                     }
-                    // set if is authenticated
-                    ViewBag.isAuthenticated = await getCrrentUser();
-                    // проба на 23.08
-                    // no access for standard user
-                    ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
 
                 }
 
             }
-            else
-            {
-                ViewBag.isAuthenticated = null;
-            }
             ViewBag.ShowTopBar = true;
-
             return View();
         }
 
-        public async Task<IActionResult> PrivacyAsync()
+        public IActionResult Privacy()
         {
-
-            // set if is authenticated
-            ViewBag.isAuthenticated = await getCrrentUser();
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             return View();
         }
-        public async Task<IActionResult> ContactAsync()
+        public IActionResult Contact()
         {
-
-            //var query = db.Database.ExecuteSqlRaw("CALL get_pet_details()");
-            //var query = db.Database.ExecuteSqlRaw("SELECT * FROM get_pet_details()");
-
-
-            // set if is authenticated
-            ViewBag.isAuthenticated = await getCrrentUser();
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             return View();
         }
Index: PostgreSqlDotnetCore/Controllers/JobsController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/JobsController.cs	(revision a3ce071e97bad04f989c769589a31427febe9ff3)
+++ PostgreSqlDotnetCore/Controllers/JobsController.cs	(revision 2aea0fddc0f6d0c25f0d44044eeb2ec5930012b9)
@@ -12,6 +12,4 @@
         public JobsController(UserManager<IdentityUser> userManager) : base(userManager)
         {
-            // set if is authenticated
-            ViewBag.isAuthenticated = new UsersClass();
         }
 
Index: PostgreSqlDotnetCore/Controllers/PetCaresController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/PetCaresController.cs	(revision a3ce071e97bad04f989c769589a31427febe9ff3)
+++ PostgreSqlDotnetCore/Controllers/PetCaresController.cs	(revision 2aea0fddc0f6d0c25f0d44044eeb2ec5930012b9)
@@ -2,5 +2,4 @@
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.EntityFrameworkCore;
-using Microsoft.AspNetCore.Mvc.Rendering;
 using PostgreSqlDotnetCore.Models;
 using System;
@@ -15,72 +14,48 @@
         }
 
-
-        [HttpGet]
-        /*  public async Task<ActionResult> Create()
-          {
-
-              var vetCenters = await db.VetCentersObj.ToListAsync();
-
-              ViewBag.VetCenters = new SelectList(vetCenters, "id", "name");
-
-              return View();
-          }*/
-        public async Task<ActionResult> Create()
-        {
-
-
-            UsersClass customerClass = await getCrrentUser();
-
-            ViewBag.isAuthenticated = customerClass;
-            var vetCenters = await db.VetCentersObj.ToListAsync();
-            ViewBag.VetCenters = new SelectList(vetCenters, "id", "name");
-
-
-            // check if the user is authenticated so we can take only his pets
-            if (customerClass != null)
-            {
-                var queryPetsByUser = from st in db.PetsObj
-                                      where st.usersid == customerClass.id
-                                      select st;
-                var userPets = await queryPetsByUser.ToListAsync<PetsClass>();
-                ViewBag.Pets = new SelectList(userPets, "id", "name");
-
-            }
-            return View();
-        }
-
-
-
-
         // GET: Customer
         public async Task<ActionResult> IndexAsync()
         {
             // check for permission
-            bool isAuthenticated = User.Identity.IsAuthenticated;
             UsersClass customerClass = await getCrrentUser();
-            // set if is authenticated
-            ViewBag.isAuthenticated = customerClass;
             if (customerClass == null)
             {
                 return RedirectToAction("AccessDenied", "Error");
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             if (customerClass.role_id == RoleConstants.Standard)
             {
                 // query
-                var query = from st in db.PetCaresObj
+                            var query = from st in db.PetCaresObj
                             where st.usersid == customerClass.id
                             select st;
 
-                var userPetCares =
-                    await query.Include(n => n.PetsClass).ToListAsync<Pet_CaresClass>();
+                var userPets =
+                    //db.PetCaresObj.FromSql($"SELECT * FROM pets where usersid={customerClass.id}").ToListAsync();
+                    await query.ToListAsync<Pet_CaresClass>();
 
-                return View(userPetCares);
-            }
-            else
+                return View(userPets);
+
+                PetCareAllData petCareAllData = new PetCareAllData();
+                petCareAllData.PetCares = userPets;
+
+
+                // query
+                var queryVetCenters = from kk in db.VetCentersObj
+                            select kk;
+
+                // query
+                var queryUsers = from st in db.CustomerObj
+                                 select st;
+
+                var users = await queryUsers.ToListAsync<UsersClass>();
+                petCareAllData.Users = users;
+
+                //var vetCenters = await queryVetCenters.ToListAsync<VetCenter>();
+                //petCareAllData.VetCenters = vetCenters;
+
+                return View(petCareAllData);
+            } else
             {
-                return View(db.PetCaresObj.Include(n => n.PetsClass).ToList());
+                return View(db.PetCaresObj.ToList());
             }
 
@@ -88,5 +63,5 @@
 
         // GET: Customer/Details/5
-        public async Task<ActionResult> Details(int? id)
+        public ActionResult Details(int? id)
         {
             if (id == null)
@@ -94,6 +69,4 @@
                 return RedirectToAction("NotExist", "Error");
             }
-            UsersClass customerClass = await getCrrentUser();
-            ViewBag.isAuthenticated = customerClass;
             Pet_CaresClass peClass = db.PetCaresObj.Find(id);
             if (peClass == null)
@@ -101,7 +74,4 @@
                 return RedirectToAction("NotExist", "Error");
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             return View(peClass);
         }
@@ -113,9 +83,9 @@
         //}
 
-        /*public ActionResult Create()
+        public ActionResult Create()
         {
             
             return View();
-        }*/
+        }
 
         // POST: Customer/Create
@@ -124,5 +94,5 @@
         [HttpPost]
         [ValidateAntiForgeryToken]
-        public async Task<ActionResult> CreateAsync([Bind(include: "id,title,description,dateending, start_date, usersid, vetcentersid, pet_id")] Pet_CaresClass peClass)
+        public async Task<ActionResult> CreateAsync([Bind(include: "id,title,description,dateending, usersid, vetcentersid")] Pet_CaresClass peClass)
         {
             bool isAuthenticated = User.Identity.IsAuthenticated;
@@ -131,16 +101,9 @@
                 return RedirectToAction("AccessDenied", "Error");
             }
-            ModelState.Remove("PetsClass");
-            ViewBag.isAuthenticated = new UsersClass();
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-            UsersClass customerClass =  null;
             if (ModelState.IsValid)
             {
-                ViewBag.isAuthenticated = new UsersClass();
                 peClass.dateending = DateTime.SpecifyKind(peClass.dateending, DateTimeKind.Utc);
-                peClass.start_date = DateTime.SpecifyKind(peClass.start_date, DateTimeKind.Utc);
                 var user = await _userManager.GetUserAsync(User);
-                customerClass = db.CustomerObj.SingleOrDefault(x => x.email == user.Email);
+                var customerClass = db.CustomerObj.SingleOrDefault(x => x.email == user.Email);
                 peClass.usersid = customerClass.id;
                 db.PetCaresObj.Add(peClass);
@@ -148,55 +111,10 @@
                 return RedirectToAction("Index");
             }
-            var vetCenters = await db.VetCentersObj.ToListAsync();
-            ViewBag.VetCenters = new SelectList(vetCenters, "id", "name");
-
-            if (customerClass != null)
-            {
-                var queryPetsByUser = from st in db.PetsObj
-                                      where st.usersid == customerClass.id
-                                      select st;
-                var userPets = await queryPetsByUser.ToListAsync<PetsClass>();
-                ViewBag.Pets = new SelectList(userPets, "id", "name");
-
-            }
 
             return View(peClass);
         }
 
-
-
         // GET: Customer/Edit/5
-        /*  public ActionResult Edit(int? id)
-          {
-              if (id == null)
-              {
-                  return RedirectToAction("NotExist", "Error");
-              }
-              Pet_CaresClass peClass = db.PetCaresObj.Find(id);
-              if (peClass == null)
-              {
-                  return RedirectToAction("NotExist", "Error");
-              }
-
-
-              return View(peClass);
-          }*/
-        // GET: Customer/Edit/5
-        /* public  ActionResult Edit(int? id)
-         {
-             if (id == null)
-             {
-                 return RedirectToAction("NotExist", "Error");
-             }
-             Pet_CaresClass peClass = db.PetCaresObj.Find(id);
-             if (peClass == null)
-             {
-                 return RedirectToAction("NotExist", "Error");
-             }
-
-
-             return View(peClass);
-         }*/
-        public async Task<ActionResult> Edit(int? id)
+        public ActionResult Edit(int? id)
         {
             if (id == null)
@@ -204,30 +122,11 @@
                 return RedirectToAction("NotExist", "Error");
             }
-
-            Pet_CaresClass peClass = await db.PetCaresObj.FindAsync(id);
+            Pet_CaresClass peClass = db.PetCaresObj.Find(id);
             if (peClass == null)
             {
                 return RedirectToAction("NotExist", "Error");
             }
-
-            var vetCenters = await db.VetCentersObj.ToListAsync();
-            ViewBag.VetCenters = new SelectList(vetCenters, "id", "name", peClass.vetcentersid);
-            // dodadeno na 22.08
-            UsersClass customerClass = await getCrrentUser();
-            // check if the user is authenticated so we can take only his pets
-            if (customerClass != null)
-            {
-                var queryPetsByUser = from st in db.PetsObj
-                                      where st.usersid == customerClass.id
-                                      select st;
-                var userPets = await queryPetsByUser.ToListAsync<PetsClass>();
-                ViewBag.Pets = new SelectList(userPets, "id", "name");
-
-            }
-            ViewBag.isAuthenticated = customerClass;
             return View(peClass);
         }
-
-
 
         // POST: Customer/Edit/5
@@ -236,5 +135,5 @@
         [HttpPost]
         [ValidateAntiForgeryToken]
-        public async Task<ActionResult> EditAsync([Bind(include: "id,title,description,dateending, vetcentersid, pet_id")] Pet_CaresClass peClass)
+        public async Task<ActionResult> EditAsync([Bind(include: "id,title,description,dateending, vetcentersid")] Pet_CaresClass peClass)
         {
             bool isAuthenticated = User.Identity.IsAuthenticated;
@@ -243,10 +142,5 @@
                 return RedirectToAction("AccessDenied", "Error");
             }
-
-            ModelState.Remove("PetsClass");
-            ViewBag.isAuthenticated = await getCrrentUser();
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
+             
             if (ModelState.IsValid)
             {
@@ -262,9 +156,6 @@
         }
 
-
-
-
         // GET: Customer/Delete/5
-        public async Task<ActionResult> Delete(int? id)
+        public ActionResult Delete(int? id)
         {
             if (id == null)
@@ -272,6 +163,4 @@
                 return RedirectToAction("NotExist", "Error");
             }
-            UsersClass customerClass = await getCrrentUser(); // Добијте ја тековната улога на корисникот
-            ViewBag.isAuthenticated = customerClass;
             Pet_CaresClass peClass = db.PetCaresObj.Find(id);
             if (peClass == null)
@@ -279,33 +168,15 @@
                 return RedirectToAction("NotExist", "Error");
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             return View(peClass);
         }
 
         // POST: Customer/Delete/5
-        /*  [HttpPost, ActionName("Delete")]
-          [ValidateAntiForgeryToken]
-          public ActionResult DeleteConfirmed(int id)
-          {
-              Pet_CaresClass peClass = db.PetCaresObj.Find(id);
-              db.PetCaresObj.Remove(peClass);
-              db.SaveChanges();
-              return RedirectToAction("Index");
-          }
-        */
-
         [HttpPost, ActionName("Delete")]
         [ValidateAntiForgeryToken]
-        public async Task<ActionResult> DeleteConfirmed(int id)
+        public ActionResult DeleteConfirmed(int id)
         {
-            Pet_CaresClass peClass = await db.PetCaresObj.FindAsync(id);
-            if (peClass == null)
-            {
-                return RedirectToAction("NotExist", "Error");
-            }
+            Pet_CaresClass peClass = db.PetCaresObj.Find(id);
             db.PetCaresObj.Remove(peClass);
-            await db.SaveChangesAsync();
+            db.SaveChanges();
             return RedirectToAction("Index");
         }
Index: PostgreSqlDotnetCore/Controllers/PetDiagnosticsControler.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/PetDiagnosticsControler.cs	(revision a3ce071e97bad04f989c769589a31427febe9ff3)
+++ 	(revision )
@@ -1,94 +1,0 @@
-﻿namespace PostgreSqlDotnetCore.Controllers
-{
-    using Microsoft.AspNetCore.Http;
-    using Microsoft.AspNetCore.Identity;
-    using Microsoft.AspNetCore.Mvc;
-    using Microsoft.Data.SqlClient;
-    using Microsoft.EntityFrameworkCore;
-    using PostgreSqlDotnetCore.Models;
-    using System.Threading.Tasks;
-
-    public class PetDiagnosticsControler : BaseController
-    {
-        public PetDiagnosticsControler(UserManager<IdentityUser> userManager) : base(userManager)
-        {
-
-        }
-        // GET: PetDiagnostics
-        public async Task<ActionResult> IndexAsync()
-        {
-            var query = await db.PetDetailsProcedureObj.ToListAsync();
-
-            return View();
-        }
-
-        // GET: PetDiagnostics/Details/5
-        public ActionResult Details(int id)
-        {
-            return View();
-        }
-
-        // GET: PetDiagnostics/Create
-        public ActionResult Create()
-        {
-            return View();
-        }
-
-        // POST: PetDiagnostics/Create
-        [HttpPost]
-        [ValidateAntiForgeryToken]
-        public ActionResult Create(IFormCollection collection)
-        {
-            try
-            {
-                return RedirectToAction(nameof(IndexAsync));
-            }
-            catch
-            {
-                return View();
-            }
-        }
-
-        // GET: PetDiagnostics/Edit/5
-        public ActionResult Edit(int id)
-        {
-            return View();
-        }
-
-        // POST: PetDiagnostics/Edit/5
-        [HttpPost]
-        [ValidateAntiForgeryToken]
-        public ActionResult Edit(int id, IFormCollection collection)
-        {
-            try
-            {
-                return RedirectToAction(nameof(IndexAsync));
-            }
-            catch
-            {
-                return View();
-            }
-        }
-
-        // GET: PetDiagnostics/Delete/5
-        public ActionResult Delete(int id)
-        {
-            return View();
-        }
-
-        // POST: PetDiagnostics/Delete/5
-        [HttpPost]
-        [ValidateAntiForgeryToken]
-        public ActionResult Delete(int id, IFormCollection collection)
-        {
-            try
-            {
-                return RedirectToAction(nameof(IndexAsync));
-            }
-            catch
-            {
-                return View();
-            }
-        }
-    }
-}
Index: PostgreSqlDotnetCore/Controllers/PetsController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/PetsController.cs	(revision a3ce071e97bad04f989c769589a31427febe9ff3)
+++ PostgreSqlDotnetCore/Controllers/PetsController.cs	(revision 2aea0fddc0f6d0c25f0d44044eeb2ec5930012b9)
@@ -19,18 +19,12 @@
             // check for permission
             UsersClass customerClass = await getCrrentUser();
-
-            // set if is authenticated
-            ViewBag.isAuthenticated = customerClass;
             if (customerClass == null)
             {
                 return RedirectToAction("AccessDenied", "Error");
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             if (customerClass.role_id == RoleConstants.Standard)
             {
-                // filter user pets by UserID
-                var query = from st in db.PetsObj
+                // kco
+                            var query = from st in db.PetsObj
                             where st.usersid == customerClass.id
                             select st;
@@ -40,6 +34,5 @@
                     await query.ToListAsync<PetsClass>();
                 return View(userPets);
-            }
-            else
+            } else
             {
                 return View(db.PetsObj.ToList());
@@ -49,95 +42,5 @@
 
         // GET: Customer/Details/5
-        /* public ActionResult Details(int? id)
-         {
-             if (id == null)
-             {
-                 return RedirectToAction("NotExist", "Error");
-             }
-             PetsClass peClass = db.PetsObj.Find(id);
-             if (peClass == null)
-             {
-                 return RedirectToAction("NotExist", "Error");
-             }
-             return View(peClass);
-         }*/
-
-        public async Task<ActionResult> Details(int? id)
-        {
-            if (id == null)
-            {
-                return RedirectToAction("NotExist", "Error");
-            }
-
-            UsersClass customerClass = await getCrrentUser(); // Добијте ја тековната улога на корисникот
-            ViewBag.isAuthenticated = customerClass;
-
-            PetsClass peClass = await db.PetsObj.FindAsync(id);
-            if (peClass == null)
-            {
-                return RedirectToAction("NotExist", "Error");
-            }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
-
-            return View(peClass);
-        }
-
-        // GET: Customer/Create
-        //public ActionResult Create()
-        //{
-        //    return View();
-        //}
-
-        public async Task<ActionResult> CreateAsync()
-        {
-
-            // check for permission
-            UsersClass customerClass = await getCrrentUser();
-            // set if is authenticated
-            ViewBag.isAuthenticated = customerClass;
-            return View();
-        }
-
-        // POST: Customer/Create
-        // To protect from overposting attacks, enable the specific properties you want to bind to, for 
-        // more details see https://go.microsoft.com/fwlink/?LinkId=317598.
-        [HttpPost]
-        [ValidateAntiForgeryToken]
-        public async Task<ActionResult> CreateAsync([Bind(include: "id,name,color,description,dateofbirthday, usersid,typeofpetsid")] PetsClass peClass)
-        {
-            bool isAuthenticated = User.Identity.IsAuthenticated;
-            if (!isAuthenticated)
-            {
-                // set if is authenticated
-                ViewBag.isAuthenticated = null;
-                return RedirectToAction("AccessDenied", "Error");
-            }
-            ViewBag.isAuthenticated = new UsersClass();
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
-            if (ModelState.IsValid)
-            {
-                // set if is authenticated
-                ViewBag.isAuthenticated = new UsersClass();
-                // peClass.dateofbirthday = DateTime.SpecifyKind(peClass.dateofbirthday, DateTimeKind.Utc);
-                var user = await _userManager.GetUserAsync(User);
-                var customerClass = db.CustomerObj.SingleOrDefault(x => x.email == user.Email);
-                peClass.usersid = customerClass.id;
-                // voa go pisav tuka na 18.02
-                // PetsClass.dateofbirthday = DateOnly.FromDateTime(DateTime.UtcNow);
-                db.PetsObj.Add(peClass);
-                db.SaveChanges();
-                return RedirectToAction("Index");
-            }
-
-            return View(peClass);
-        }
-
-        // GET: Customer/Edit/5
-        // public ActionResult Edit(int? id)
-        public async Task<ActionResult> Edit(int? id)
+        public ActionResult Details(int? id)
         {
             if (id == null)
@@ -150,9 +53,59 @@
                 return RedirectToAction("NotExist", "Error");
             }
-            // додадено на 21.08
-            ViewBag.isAuthenticated = await getCrrentUser();
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
+            return View(peClass);
+        }
 
+        // GET: Customer/Create
+        //public ActionResult Create()
+        //{
+        //    return View();
+        //}
+
+        public ActionResult Create()
+        {
+            
+            return View();
+        }
+
+        // POST: Customer/Create
+        // To protect from overposting attacks, enable the specific properties you want to bind to, for 
+        // more details see https://go.microsoft.com/fwlink/?LinkId=317598.
+        [HttpPost]
+        [ValidateAntiForgeryToken]
+        public async Task<ActionResult> CreateAsync([Bind(include: "id,color,description,dateofbirthday, usersid,typeofpetsid")] PetsClass peClass)
+        {
+            bool isAuthenticated = User.Identity.IsAuthenticated;
+            if (!isAuthenticated)
+            {
+                return RedirectToAction("AccessDenied", "Error");
+            }
+            if (ModelState.IsValid)
+            {
+               // peClass.dateofbirthday = DateTime.SpecifyKind(peClass.dateofbirthday, DateTimeKind.Utc);
+                var user = await _userManager.GetUserAsync(User);
+                var customerClass = db.CustomerObj.SingleOrDefault(x => x.email == user.Email);
+                peClass.usersid = customerClass.id;
+                // voa go pisav tuka na 18.02
+               // PetsClass.dateofbirthday = DateOnly.FromDateTime(DateTime.UtcNow);
+                db.PetsObj.Add(peClass);
+                db.SaveChanges();
+                return RedirectToAction("Index");
+            }
+
+            return View(peClass);
+        }
+
+        // GET: Customer/Edit/5
+        public ActionResult Edit(int? id)
+        {
+            if (id == null)
+            {
+                return RedirectToAction("NotExist", "Error");
+            }
+            PetsClass peClass = db.PetsObj.Find(id);
+            if (peClass == null)
+            {
+                return RedirectToAction("NotExist", "Error");
+            }
             return View(peClass);
         }
@@ -163,28 +116,16 @@
         [HttpPost]
         [ValidateAntiForgeryToken]
-        public async Task<ActionResult> EditAsync([Bind(include: "id,name, color,description,dateofbirthday, usersid,typeofpetsid")] PetsClass peClass)
+        public async Task<ActionResult> EditAsync([Bind(include: "id,color,description,dateofbirthday, usersid,typeofpetsid")] PetsClass peClass)
         {
             bool isAuthenticated = User.Identity.IsAuthenticated;
-            ViewBag.isAuthenticated = await getCrrentUser();
-
             if (!isAuthenticated)
             {
-                // set if is authenticated
-                ViewBag.isAuthenticated = null;
                 return RedirectToAction("AccessDenied", "Error");
             }
-
-            // set if is authenticated
-            // додадено и избришено
-            ViewBag.isAuthenticated = await getCrrentUser();
-            //ViewBag.isAuthenticated = new UsersClass();
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
-
+             
             if (ModelState.IsValid)
             {
                 //peClass.dateofbirthday = DateTime.SpecifyKind(peClass.dateofbirthday, DateTimeKind.Utc);
-
+                
                 var user = await _userManager.GetUserAsync(User);
                 var customerClass = db.CustomerObj.SingleOrDefault(x => x.email == user.Email);
@@ -198,19 +139,5 @@
 
         // GET: Customer/Delete/5
-        /* public ActionResult Delete(int? id)
-         {
-             if (id == null)
-             {
-                 return RedirectToAction("NotExist", "Error");
-             }
-             PetsClass peClass = db.PetsObj.Find(id);
-             if (peClass == null)
-             {
-                 return RedirectToAction("NotExist", "Error");
-             }
-             return View(peClass);
-         }*/
-
-        public async Task<ActionResult> Delete(int? id)
+        public ActionResult Delete(int? id)
         {
             if (id == null)
@@ -218,17 +145,9 @@
                 return RedirectToAction("NotExist", "Error");
             }
-
-            UsersClass customerClass = await getCrrentUser(); // Добијте ја тековната улога на корисникот
-            ViewBag.isAuthenticated = customerClass;
-
-            PetsClass peClass = await db.PetsObj.FindAsync(id);
+            PetsClass peClass = db.PetsObj.Find(id);
             if (peClass == null)
             {
                 return RedirectToAction("NotExist", "Error");
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
-
             return View(peClass);
         }
Index: PostgreSqlDotnetCore/Controllers/ProductsController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/ProductsController.cs	(revision a3ce071e97bad04f989c769589a31427febe9ff3)
+++ PostgreSqlDotnetCore/Controllers/ProductsController.cs	(revision 2aea0fddc0f6d0c25f0d44044eeb2ec5930012b9)
@@ -2,10 +2,6 @@
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.EntityFrameworkCore;
-using Npgsql;
-using System.Linq;
 using PostgreSqlDotnetCore.Models;
-//using System.Net;
-using System.Threading.Tasks;
-using PostgreSqlDotnetCore.Data;
+using System.Net;
 
 namespace PostgreSqlDotnetCore.Controllers
@@ -13,5 +9,4 @@
     public class ProductsController : BaseController
     {
-
         public ProductsController(UserManager<IdentityUser> userManager) : base(userManager)
         {
@@ -26,12 +21,6 @@
         //}
         // GET: Customer
-        public async Task<ActionResult> IndexAsync(string? searchString)
+        public ActionResult Index(string? searchString)
         {
-            // set if is authenticated
-            ViewBag.isAuthenticated = await getCrrentUser();
-            ViewBag.hasAccess = await checkAuthorizationAsync();
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             if (!String.IsNullOrEmpty(searchString))
             {
@@ -48,8 +37,6 @@
         }
 
-        
-
         // GET: Customer/Details/5
-        public async Task<ActionResult> Details(int? id)
+        public ActionResult Details(int? id)
         {
             if (id == null)
@@ -57,11 +44,4 @@
                 return RedirectToAction("NotExist", "Error");
             }
-            // додано на 28.08
-         
-
-
-
-          UsersClass customerClass = await getCrrentUser(); 
-            ViewBag.isAuthenticated = customerClass;
             ProductsClass prodClass = db.ProductObj.Find(id);
             if (prodClass == null)
@@ -69,7 +49,4 @@
                 return RedirectToAction("NotExist", "Error");
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             return View(prodClass);
         }
@@ -85,23 +62,14 @@
             // check for permission
             UsersClass customerClass = await checkAuthorizationAsync();
-            // set if is authenticated
-            ViewBag.isAuthenticated = await getCrrentUser();
-
             if (customerClass == null)
             {
                 return RedirectToAction("AccessDenied", "Error");
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
             var model = new ProductsClass
             {
-              //  dateadded = DateTime.Now // Поставете го датумот на моменталниот датум
+                dateadded = DateTime.Now // Поставете го датумот на моменталниот датум
             };
             return View(model);
         }
-
-
-
 
         // POST: Customer/Create
@@ -110,9 +78,9 @@
         [HttpPost]
         [ValidateAntiForgeryToken]
-        public ActionResult Create([Bind(include: "id,name,description,price, is_active, dateadded, category, int available_quantity")] ProductsClass prodClass)
+        public ActionResult Create([Bind(include: "id,name,description,price, is_active, dateadded, category")] ProductsClass prodClass)
         {
             if (ModelState.IsValid)
             {
-              //  prodClass.dateadded = new DateTime();
+                prodClass.dateadded = new DateTime();
                 prodClass.isactive = true;
                 db.ProductObj.Add(prodClass);
@@ -132,7 +100,4 @@
             }
             UsersClass customerClass = await checkAuthorizationAsync();
-            // set if is authenticated
-            ViewBag.isAuthenticated = await getCrrentUser();
-
             if (customerClass == null)
             {
@@ -152,5 +117,5 @@
         [HttpPost]
         [ValidateAntiForgeryToken]
-        public ActionResult Edit([Bind(include: "id,name,description,price, is_active, dateadded, category, int available_quantity")] ProductsClass prodClass)
+        public ActionResult Edit([Bind(include: "id,name,description,price, is_active, dateadded, category")] ProductsClass prodClass)
         {
             if (ModelState.IsValid)
@@ -171,7 +136,4 @@
             }
             UsersClass customerClass = await checkAuthorizationAsync();
-            // set if is authenticated
-            ViewBag.isAuthenticated = await getCrrentUser();
-
             if (customerClass == null)
             {
Index: PostgreSqlDotnetCore/Controllers/VetCenterController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/VetCenterController.cs	(revision a3ce071e97bad04f989c769589a31427febe9ff3)
+++ PostgreSqlDotnetCore/Controllers/VetCenterController.cs	(revision 2aea0fddc0f6d0c25f0d44044eeb2ec5930012b9)
@@ -3,8 +3,6 @@
 using Microsoft.EntityFrameworkCore;
 using PostgreSqlDotnetCore.Models;
-using Microsoft.AspNetCore.Mvc.Rendering;
-using System.Threading.Tasks;
-using Npgsql;
-using PostgreSqlDotnetCore.Data;
+using System.Data;
+using System.Net;
 
 namespace PostgreSqlDotnetCore.Controllers
@@ -12,83 +10,16 @@
     public class VetCenterController : BaseController
     {
-        /*  
-         public VetCenterController(UserManager<IdentityUser> userManager) : base(userManager)
-           {
-           }
-        */
-        private readonly ApplicationDbContext db;
-
-        public VetCenterController(UserManager<IdentityUser> userManager, ApplicationDbContext context) : base(userManager)
+        public VetCenterController(UserManager<IdentityUser> userManager) : base(userManager)
         {
-            db = context ?? throw new ArgumentNullException(nameof(context)); 
         }
 
-        public async Task<ActionResult> Create()
+        // GET: Customer
+        public ActionResult Index()
         {
-            // Set if user is authenticated
-            UsersClass customerClass = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin);
-            ViewBag.isAuthenticated = await getCrrentUser();
-            if (customerClass == null)
-            {
-                return RedirectToAction("AccessDenied", "Error");
-            }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
-            // Fetch cities for dropdown
-            var citiess = await db.CitiesObj.ToListAsync();
-            ViewBag.Citiess = new SelectList(citiess, "id", "name");
-
-            return View();
+            return View(db.VetCentersObj.ToList());
         }
 
-        /* public async Task<ActionResult> Index()
-         {
-
-             var vetCenters = await db.VetCentersObj.ToListAsync();
-             ViewBag.isAuthenticated = User.Identity.IsAuthenticated;
-
-             // Check if the user is an admin
-             UsersClass customerClass = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin);
-             ViewBag.hasAccess = customerClass != null;
-
-             return View(vetCenters);
-         }*/
-        /* public async Task<ActionResult> Index()
-         {
-             var vetCenters = await db.VetCentersObj.ToListAsync();
-             ViewBag.isAuthenticated = User.Identity.IsAuthenticated;
-             // no access for standard user
-             ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
-             // Проверете дали корисникот е администратор или менаџер
-             UsersClass customerClass = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin);
-             // ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
-             ViewBag.hasAccess = customerClass != null;
-
-             return View(vetCenters);
-         }
-     */
-        public async Task<ActionResult> Index()
-        {
-            ViewBag.isAuthenticated = await getCrrentUser();
-            ViewBag.hasAccess = await checkAuthorizationAsync();
-            var vetCenters = await db.VetCentersWithCity.ToListAsync(); 
-           // ViewBag.isAuthenticated = User.Identity.IsAuthenticated;
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
-            
-            UsersClass customerClass = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin);
-
-            ViewBag.hasAccess = customerClass != null;
-
-            return View(vetCenters);
-        }
-
-
-
-        /*public async Task<ActionResult> Details(int? id)
+        // GET: Customer/Details/5
+        public ActionResult Details(int? id)
         {
             if (id == null)
@@ -96,21 +27,43 @@
                 return RedirectToAction("NotExist", "Error");
             }
-
-            VetCenter vetClass = await db.VetCentersObj.FindAsync(id);
-            UsersClass customerClass = await getCrrentUser();
-            ViewBag.isAuthenticated = customerClass;
+            VetCenter vetClass = db.VetCentersObj.Find(id);
             if (vetClass == null)
             {
                 return RedirectToAction("NotExist", "Error");
             }
-            // no access for standard user
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
+            return View(vetClass);
+        }
+
+        // GET: Customer/Create
+        public async Task<ActionResult> CreateAsync()
+        {
+            // check for permission
+            UsersClass customerClass = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin);
+            if (customerClass == null)
+            {
+                return RedirectToAction("AccessDenied", "Error");
+            }
+            return View();
+        }
+
+        // POST: Customer/Create
+        // To protect from overposting attacks, enable the specific properties you want to bind to, for 
+        // more details see https://go.microsoft.com/fwlink/?LinkId=317598.
+        [HttpPost]
+        [ValidateAntiForgeryToken]
+        public ActionResult Create([Bind(include: "id,name,adress,description,workinghours,phonenumber,latitude,longitude,citiesid")] VetCenter vetClass)
+        {
+            if (ModelState.IsValid)
+            {
+                db.VetCentersObj.Add(vetClass);
+                db.SaveChanges();
+                return RedirectToAction("Index");
+            }
 
             return View(vetClass);
         }
 
-
-       */
-        public async Task<IActionResult> Details(int? id)
+        // GET: Customer/Edit/5
+        public async Task<ActionResult> EditAsync(int? id)
         {
             if (id == null)
@@ -118,97 +71,36 @@
                 return RedirectToAction("NotExist", "Error");
             }
-
-            // Логирајте го ID-то за дебугирање
-            Console.WriteLine($"ID: {id}");
-
-            // Обидете се да најдете запис во view
-            VetCenterWithCity vetClass = await db.VetCentersWithCity
-                                                 .Where(v => v.id == id) 
-                                                 .FirstOrDefaultAsync();
+            VetCenter vetClass = db.VetCentersObj.Find(id);
             if (vetClass == null)
             {
                 return RedirectToAction("NotExist", "Error");
             }
-
-            
-            UsersClass customerClass = await getCrrentUser();
-            ViewBag.isAuthenticated = customerClass;
-
-           
+            // check for permission
+            UsersClass customerClass = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin);
+            if (customerClass == null)
+            {
+                return RedirectToAction("AccessDenied", "Error");
+            }
             return View(vetClass);
         }
 
-
-
-
-
-
-
-
-
-
-
-
+        // POST: Customer/Edit/5
+        // To protect from overposting attacks, enable the specific properties you want to bind to, for 
+        // more details see https://go.microsoft.com/fwlink/?LinkId=317598.
         [HttpPost]
         [ValidateAntiForgeryToken]
-        public async Task<ActionResult> Create([Bind(include: "id,name,adress,description,workinghours,phonenumber,latitude,longitude,citiesid")] VetCenter vetClass)
+        public ActionResult Edit([Bind(include: "id,name,adress,description,workinghours,phonenumber,latitude,longitude,citiesid")] VetCenter vetClass)
         {
             if (ModelState.IsValid)
             {
-                db.VetCentersObj.Add(vetClass);
-                await db.SaveChangesAsync();
+                db.Entry(vetClass).State = EntityState.Modified;
+                db.SaveChanges();
                 return RedirectToAction("Index");
             }
-
-            // If model is invalid, repopulate the cities for dropdown
-            var citiess = await db.CitiesObj.ToListAsync();
-            ViewBag.Citiess = new SelectList(citiess, "id", "name", vetClass.citiesid);
-
             return View(vetClass);
         }
 
-   
-
-         /*public async Task<ActionResult> Create([Bind(include: "id,name,adress,description,workinghours,phonenumber,latitude,longitude,citiesid")] VetCenter vetClass)
-         {
-             // Логирање на параметрите
-             Console.WriteLine($"Parameters: {vetClass.name}, {vetClass.adress}, {vetClass.description}, {vetClass.workinghours}, {vetClass.phonenumber}, {vetClass.latitude}, {vetClass.longitude}, {vetClass.citiesid}");
-
-             if (ModelState.IsValid)
-             {
-                 // Повик на складираната процедура
-                 var parameters = new[]
-                 {
-             new NpgsqlParameter("@name", vetClass.name),
-             new NpgsqlParameter("@adress", vetClass.adress),
-             new NpgsqlParameter("@description", vetClass.description),
-             new NpgsqlParameter("@workinghours", vetClass.workinghours),
-             new NpgsqlParameter("@phonenumber", vetClass.phonenumber),
-             new NpgsqlParameter("@latitude", (decimal)vetClass.latitude),
-             new NpgsqlParameter("@longitude", (decimal)vetClass.longitude),
-             new NpgsqlParameter("@citiesid", vetClass.citiesid)
-         };
-
-                 await db.Database.ExecuteSqlRawAsync("CALL project.AddVetCenter(@name, @adress, @description, @workinghours, @phonenumber, @latitude, @longitude, @citiesid)", parameters);
-
-                 return RedirectToAction("Index");
-             }
-
-             // Ако моделот не е валиден, повторно пополнете ги градовите за паѓачкиот мени
-             var citiess = await db.CitiesObj.ToListAsync();
-             ViewBag.Citiess = new SelectList(citiess, "id", "name", vetClass.citiesid);
-
-             return View(vetClass);
-         }
-
-         
-
-
-        */
-
-
-
-
-        public async Task<ActionResult> Edit(int? id)
+        // GET: Customer/Delete/5
+        public ActionResult Delete(int? id)
         {
             if (id == null)
@@ -216,76 +108,20 @@
                 return RedirectToAction("NotExist", "Error");
             }
-
-            VetCenter vetClass = await db.VetCentersObj.FindAsync(id);
+            VetCenter vetClass = db.VetCentersObj.Find(id);
             if (vetClass == null)
             {
                 return RedirectToAction("NotExist", "Error");
             }
-
-            // Check for permission
-            UsersClass customerClass = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin);
-            //UsersClass customerClass = await checkAuthorizationAsync();
-            ViewBag.isAuthenticated = await getCrrentUser();
-            if (customerClass == null)
-            {
-                return RedirectToAction("AccessDenied", "Error");
-            }
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
-
-            // Fetch cities for dropdown
-            var citiess = await db.CitiesObj.ToListAsync();
-            ViewBag.Citiess = new SelectList(citiess, "id", "name", vetClass.citiesid);
-
             return View(vetClass);
         }
 
-        [HttpPost]
-        [ValidateAntiForgeryToken]
-        public async Task<ActionResult> Edit([Bind(include: "id,name,adress,description,workinghours,phonenumber,latitude,longitude,citiesid")] VetCenter vetClass)
-        {
-            if (ModelState.IsValid)
-            {
-                db.Entry(vetClass).State = EntityState.Modified;
-                await db.SaveChangesAsync();
-                return RedirectToAction("Index");
-            }
-
-            // If model is invalid, repopulate the cities for dropdown
-            var citiess = await db.CitiesObj.ToListAsync();
-            ViewBag.Citiess = new SelectList(citiess, "id", "name", vetClass.citiesid);
-
-            return View(vetClass);
-        }
-
-        public async Task<ActionResult> Delete(int? id)
-        {
-            UsersClass customerClass = await checkAuthorizationAsync();
-
-            ViewBag.isAuthenticated = await getCrrentUser();
-
-            if (id == null)
-            {
-                return RedirectToAction("NotExist", "Error");
-            }
-
-            VetCenter vetClass = await db.VetCentersObj.FindAsync(id);
-            if (vetClass == null)
-            {
-                return RedirectToAction("NotExist", "Error");
-            }
-            ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager);
-
-
-            return View(vetClass);
-        }
-
+        // POST: Customer/Delete/5
         [HttpPost, ActionName("Delete")]
         [ValidateAntiForgeryToken]
-        public async Task<ActionResult> DeleteConfirmed(int id)
+        public ActionResult DeleteConfirmed(int id)
         {
-            VetCenter vetClass = await db.VetCentersObj.FindAsync(id);
+            VetCenter vetClass = db.VetCentersObj.Find(id);
             db.VetCentersObj.Remove(vetClass);
-            await db.SaveChangesAsync();
+            db.SaveChanges();
             return RedirectToAction("Index");
         }
@@ -300,17 +136,22 @@
         }
 
-        public async Task<ActionResult> IndexWithSearch(string searchTerm)
+
+        // GET: VetCenter/Search
+        public ActionResult IndexWithSearch(string searchTerm)
         {
             if (string.IsNullOrEmpty(searchTerm))
             {
-                var vetCenters = await db.VetCentersObj.ToListAsync();
+                var vetCenters = db.VetCentersObj.ToList();
                 return View(vetCenters);
             }
             else
             {
-                var searchResults = await db.VetCentersObj.Where(vc => vc.name.Contains(searchTerm)).ToListAsync();
+                var searchResults = db.VetCentersObj.Where(vc => vc.name.Contains(searchTerm)).ToList();
                 return View(searchResults);
             }
         }
+
+
+
     }
 }
