public int DeleteLoaiCongViec(LoaiCongViec loaicongviec) { List <SqlParameter> paras = new List <SqlParameter>(); paras.Add(new SqlParameter("@maloaicongviec", loaicongviec.MaLoaiCV)); return(p.ExecNonQuery("", CommandType.StoredProcedure, paras)); }
public static LoaiCongViecDTO FromEntity(LoaiCongViec item) { return(new LoaiCongViecDTO() { Id = item.Id, TenLoaiCongViec = item.TenLoaiCongViec, CongViec = item.CongViec?.Select(CongViecDTO.FromEntity), }); }
public int UpdateLoaiCongViec(LoaiCongViec loaicongviec) { List <SqlParameter> paras = new List <SqlParameter>(); paras.Add(new SqlParameter("@maloaicongviec", loaicongviec.MaLoaiCV)); try { return(p.ExecNonQuery("", CommandType.StoredProcedure, paras)); } catch (SqlException p) { throw p; } }
public async Task UpdateLoaiCongViec(LoaiCongViec loaiCongViec) { await _loaiCongViecRepository.UpdateAsync(loaiCongViec); }
public async Task CreateLoaiCongViec(LoaiCongViec loaiCongViec) { await _loaiCongViecRepository.AddAsync(loaiCongViec); }