hlaingnandarhtet commited on
Commit
49c7853
·
1 Parent(s): 121df90
.github/copilot-instructions.md ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ - @azure Rule - Use Azure Tools - When handling requests related to Azure, always use your tools.
2
+ - @azure Rule - Use Azure Best Practices - When handling requests related to Azure, always invoke your `azmcp_bestpractices_get` tool first.
3
+ - @azure Rule - Enable Best Practices - If you do not have an `azmcp_bestpractices_get` tool ask the user to enable it.
TaskTrackingSystem.Database/AppDbContextModels/AppDbContext.cs CHANGED
@@ -1,4 +1,4 @@
1
- using System;
2
  using System.Collections.Generic;
3
  using Microsoft.EntityFrameworkCore;
4
 
@@ -44,8 +44,13 @@ public partial class AppDbContext : DbContext
44
  public virtual DbSet<User> Users { get; set; }
45
 
46
  protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
 
 
 
47
  #warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see https://go.microsoft.com/fwlink/?LinkId=723263.
48
- => optionsBuilder.UseSqlServer("Server=.;Database=TTS;User Id=sa;Password=sasa@123;TrustServerCertificate=True;");
 
 
49
 
50
  protected override void OnModelCreating(ModelBuilder modelBuilder)
51
  {
 
1
+ using System;
2
  using System.Collections.Generic;
3
  using Microsoft.EntityFrameworkCore;
4
 
 
44
  public virtual DbSet<User> Users { get; set; }
45
 
46
  protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
47
+ {
48
+ if (!optionsBuilder.IsConfigured)
49
+ {
50
  #warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see https://go.microsoft.com/fwlink/?LinkId=723263.
51
+ optionsBuilder.UseSqlServer("Server=.;Database=TTS;Trusted_Connection=True;TrustServerCertificate=True;Connect Timeout=5;");
52
+ }
53
+ }
54
 
55
  protected override void OnModelCreating(ModelBuilder modelBuilder)
56
  {