예제 #1
0
 public City GetCityById(Guid cityId)
 {
     try
     {
         using (IDbContextBase context = DbContextFactory.GetDbContext())
         {
             return(context.Find <City>(cityId));
         }
     }
     catch
     {
         throw;
     }
 }
예제 #2
0
 public Property GetPropertyById(Guid propertyId)
 {
     try
     {
         using (IDbContextBase context = DbContextFactory.GetDbContext())
         {
             return(context.Find <Property>(propertyId));
         }
     }
     catch
     {
         throw;
     }
 }
예제 #3
0
 public User GetUserById(Guid userId)
 {
     try
     {
         using (IDbContextBase context = DbContextFactory.GetDbContext())
         {
             return(context.Find <User>(userId));
         }
     }
     catch
     {
         throw;
     }
 }
예제 #4
0
 public Role GetRoleById(Guid roleId)
 {
     try
     {
         using (IDbContextBase context = DbContextFactory.GetDbContext())
         {
             return(context.Find <Role>(roleId));
         }
     }
     catch
     {
         throw;
     }
 }
예제 #5
0
 public District GetDistrictById(Guid districtId)
 {
     try
     {
         using (IDbContextBase context = DbContextFactory.GetDbContext())
         {
             return(context.Find <District>(districtId));
         }
     }
     catch
     {
         throw;
     }
 }
예제 #6
0
 public bool CheckRoleIsUsed(Guid roleId)
 {
     try
     {
         using (IDbContextBase context = DbContextFactory.GetDbContext())
         {
             int count = context.Find <Role>(roleId).User_Role.Count();
             return(count > 0);
         }
     }
     catch
     {
         throw;
     }
 }