コード例 #1
0
ファイル: RoleRepository.cs プロジェクト: AroSaneD/KPT-2
 public static RoleDto Read(int id)
 {
     using (var db = new MainDBModelContainer())
     {
         var data = db.RoleSet.Find(id);
         if (data != null)
         {
             return(RoleMapper.EntityToDto(data));
         }
         throw new ElementNotFoundException();
     }
 }