コード例 #1
0
ファイル: Mapper.cs プロジェクト: Sergu/HostelApp
 public static RoomTypesBll ToBll(this RoomTypesDal roomTypesDal)
 {
     return(new RoomTypesBll()
     {
         Id = roomTypesDal.Id,
         ShortName = roomTypesDal.ShortName,
         Type = roomTypesDal.Type
     });
 }
コード例 #2
0
ファイル: RoomTyperepository.cs プロジェクト: Sergu/HostelApp
        public RoomTypesDal GetById(int id)
        {
            var sql = @"SELECT * FROM dbo.RoomTypes WHERE Id = @identifier";

            RoomTypesDal roomTypes = new RoomTypesDal();

            using (IDbConnection connection = new SqlConnection(_connectionString))
            {
                roomTypes = connection.Query <RoomTypesDal>(sql, new
                {
                    identifier = id
                }).ToList().FirstOrDefault();
            }

            return(roomTypes);
        }
コード例 #3
0
ファイル: RoomTyperepository.cs プロジェクト: Sergu/HostelApp
 public bool Update(RoomTypesDal item)
 {
     throw new NotImplementedException();
 }