[e9bb9d1] | 1 | namespace PostgreSqlDotnetCore.Controllers
|
---|
| 2 | {
|
---|
| 3 | using Microsoft.AspNetCore.Http;
|
---|
| 4 | using Microsoft.AspNetCore.Identity;
|
---|
| 5 | using Microsoft.AspNetCore.Mvc;
|
---|
| 6 | using Microsoft.Data.SqlClient;
|
---|
| 7 | using Microsoft.EntityFrameworkCore;
|
---|
| 8 | using PostgreSqlDotnetCore.Models;
|
---|
| 9 | using System.Threading.Tasks;
|
---|
| 10 |
|
---|
| 11 | public class PetDiagnosticsControler : BaseController
|
---|
| 12 | {
|
---|
| 13 | public PetDiagnosticsControler(UserManager<IdentityUser> userManager) : base(userManager)
|
---|
| 14 | {
|
---|
| 15 |
|
---|
| 16 | }
|
---|
| 17 | // GET: PetDiagnostics
|
---|
| 18 | public async Task<ActionResult> IndexAsync()
|
---|
| 19 | {
|
---|
| 20 | var query = await db.PetDetailsProcedureObj.ToListAsync();
|
---|
| 21 |
|
---|
| 22 | return View();
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | // GET: PetDiagnostics/Details/5
|
---|
| 26 | public ActionResult Details(int id)
|
---|
| 27 | {
|
---|
| 28 | return View();
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | // GET: PetDiagnostics/Create
|
---|
| 32 | public ActionResult Create()
|
---|
| 33 | {
|
---|
| 34 | return View();
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | // POST: PetDiagnostics/Create
|
---|
| 38 | [HttpPost]
|
---|
| 39 | [ValidateAntiForgeryToken]
|
---|
| 40 | public ActionResult Create(IFormCollection collection)
|
---|
| 41 | {
|
---|
| 42 | try
|
---|
| 43 | {
|
---|
| 44 | return RedirectToAction(nameof(IndexAsync));
|
---|
| 45 | }
|
---|
| 46 | catch
|
---|
| 47 | {
|
---|
| 48 | return View();
|
---|
| 49 | }
|
---|
| 50 | }
|
---|
| 51 |
|
---|
| 52 | // GET: PetDiagnostics/Edit/5
|
---|
| 53 | public ActionResult Edit(int id)
|
---|
| 54 | {
|
---|
| 55 | return View();
|
---|
| 56 | }
|
---|
| 57 |
|
---|
| 58 | // POST: PetDiagnostics/Edit/5
|
---|
| 59 | [HttpPost]
|
---|
| 60 | [ValidateAntiForgeryToken]
|
---|
| 61 | public ActionResult Edit(int id, IFormCollection collection)
|
---|
| 62 | {
|
---|
| 63 | try
|
---|
| 64 | {
|
---|
| 65 | return RedirectToAction(nameof(IndexAsync));
|
---|
| 66 | }
|
---|
| 67 | catch
|
---|
| 68 | {
|
---|
| 69 | return View();
|
---|
| 70 | }
|
---|
| 71 | }
|
---|
| 72 |
|
---|
| 73 | // GET: PetDiagnostics/Delete/5
|
---|
| 74 | public ActionResult Delete(int id)
|
---|
| 75 | {
|
---|
| 76 | return View();
|
---|
| 77 | }
|
---|
| 78 |
|
---|
| 79 | // POST: PetDiagnostics/Delete/5
|
---|
| 80 | [HttpPost]
|
---|
| 81 | [ValidateAntiForgeryToken]
|
---|
| 82 | public ActionResult Delete(int id, IFormCollection collection)
|
---|
| 83 | {
|
---|
| 84 | try
|
---|
| 85 | {
|
---|
| 86 | return RedirectToAction(nameof(IndexAsync));
|
---|
| 87 | }
|
---|
| 88 | catch
|
---|
| 89 | {
|
---|
| 90 | return View();
|
---|
| 91 | }
|
---|
| 92 | }
|
---|
| 93 | }
|
---|
| 94 | }
|
---|