public SysDMType toSysDMType() { SysDMType result = new SysDMType(); //result.Id = string.IsNullOrEmpty(this.Id.ToString()) ? Int32.Parse(Guid.NewGuid().ToString()) : this.Id; result.Id = this.Id; result.Name = this.Name; result.Description = this.Description; return result; }
/// <summary> /// Thêm mơi SysDMType vào database /// </summary> /// <param name="SysDMType"></param> /// <returns></returns> /// <modify> /// Author date comment /// Anhhn 10/6/15 create /// </modify> public int Add(SysDMType SysDMType) { db.SysDMTypes.Add(SysDMType); return db.SaveChanges(); }
/// <summary> /// Cập nhập SysDMType vào database /// </summary> /// <param name="SysDMType"></param> /// <returns></returns> /// <modify> /// Author date comment /// Anhhn 10/6/15 create /// </modify> public int Update(SysDMType SysDMType) { db.Entry(SysDMType).State = EntityState.Modified; return db.SaveChanges(); }
public SysDMTypeModel(SysDMType SysDMType) { this.Id = SysDMType.Id; this.Name = SysDMType.Name; this.Description = SysDMType.Description; }