Changeset e9bb9d1 for PostgreSqlDotnetCore/Controllers/HomeController.cs
- Timestamp:
- 08/28/24 21:41:13 (4 weeks ago)
- Branches:
- main
- Children:
- a850333
- Parents:
- 118e414
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
PostgreSqlDotnetCore/Controllers/HomeController.cs
r118e414 re9bb9d1 1 1 using Microsoft.AspNetCore.Identity; 2 2 using Microsoft.AspNetCore.Mvc; 3 using Microsoft.EntityFrameworkCore; 3 4 using PostgreSqlDotnetCore.Data; 4 5 using PostgreSqlDotnetCore.Models; … … 30 31 if (user != null) 31 32 { 32 UsersClass customerClass = db.CustomerObj.SingleOrDefault(x => x.email == user.Email);33 UsersClass customerClass = db.CustomerObj.SingleOrDefault(x => x.email == user.Email); 33 34 if (customerClass == null) 34 35 { … … 43 44 lastName = nameLastName[0].Split('.')[1]; 44 45 } 45 } catch(Exception ex) { 46 } 47 catch (Exception ex) 48 { 46 49 } 47 50 db.CustomerObj.Add(new UsersClass( … … 65 68 } 66 69 67 } else 70 } 71 else 68 72 { 69 73 ViewBag.isAuthenticated = null; … … 86 90 public async Task<IActionResult> ContactAsync() 87 91 { 92 93 //var query = db.Database.ExecuteSqlRaw("CALL get_pet_details()"); 94 //var query = db.Database.ExecuteSqlRaw("SELECT * FROM get_pet_details()"); 95 96 88 97 // set if is authenticated 89 98 ViewBag.isAuthenticated = await getCrrentUser();
Note:
See TracChangeset
for help on using the changeset viewer.