Ignore:
Timestamp:
08/28/24 21:41:13 (4 weeks ago)
Author:
ElenaMoskova <elena.moskova99@…>
Branches:
main
Children:
a850333
Parents:
118e414
Message:

Use of views

  1. Use of views in VetCenters.
  2. Ability to provide a response to a given response.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • PostgreSqlDotnetCore/Controllers/HomeController.cs

    r118e414 re9bb9d1  
    11using Microsoft.AspNetCore.Identity;
    22using Microsoft.AspNetCore.Mvc;
     3using Microsoft.EntityFrameworkCore;
    34using PostgreSqlDotnetCore.Data;
    45using PostgreSqlDotnetCore.Models;
     
    3031                if (user != null)
    3132                {
    32                     UsersClass customerClass = db.CustomerObj.SingleOrDefault(x=> x.email == user.Email);
     33                    UsersClass customerClass = db.CustomerObj.SingleOrDefault(x => x.email == user.Email);
    3334                    if (customerClass == null)
    3435                    {
     
    4344                                lastName = nameLastName[0].Split('.')[1];
    4445                            }
    45                         } catch(Exception ex) {
     46                        }
     47                        catch (Exception ex)
     48                        {
    4649                        }
    4750                        db.CustomerObj.Add(new UsersClass(
     
    6568                }
    6669
    67             } else
     70            }
     71            else
    6872            {
    6973                ViewBag.isAuthenticated = null;
     
    8690        public async Task<IActionResult> ContactAsync()
    8791        {
     92
     93            //var query = db.Database.ExecuteSqlRaw("CALL get_pet_details()");
     94            //var query = db.Database.ExecuteSqlRaw("SELECT * FROM get_pet_details()");
     95
     96
    8897            // set if is authenticated
    8998            ViewBag.isAuthenticated = await getCrrentUser();
Note: See TracChangeset for help on using the changeset viewer.