コード例 #1
0
ファイル: UnitOfWork.cs プロジェクト: 1075980722/DormApp
 public string GetRoomType(int person_id)
 {
     try
     {
         return(RoomTypes.GetAll().Join(
                    Agreements.GetAll(),
                    r => r.id_type,
                    a => a.room_id,
                    (r, a) => new KeyValuePair <RoomType, Agreement>(r, a))
                .Where(res => res.Value.person_id == person_id)
                .Select(res => res.Key.name).ToList().Last());
     }
     catch { return("..."); }
 }