public void map(tb_userApps ent, out UserAppsModel obj) { obj = new UserAppsModel(); if (ent == null) { throw new Exception("source cannot be null"); } obj.Id = ent.Id; obj.UserName = ent.UserName; obj.Password = ent.Password; obj.IsExpired = ent.IsExpired; obj.EmployeeId = ent.EmployeeId; }
public UserAppsModel MapToModel(tb_userApps fromEntity) { if (fromEntity == null) { throw new Exception("Source Data cannot be null"); } UserAppsModel model = new UserAppsModel(); model.Id = fromEntity.Id; model.UserName = fromEntity.UserName; model.Password = fromEntity.Password; model.IsExpired = fromEntity.IsExpired; model.EmployeeId = fromEntity.EmployeeId; model.CreatedBy = fromEntity.CreatedBy; model.CreatedDate = fromEntity.CreatedDate; model.ModifiedBy = fromEntity.ModifiedBy; model.ModifiedDate = fromEntity.ModifiedDate; return(model); }