public DAMInfoDto GetDam() { DAMInfo damInfo = _DBContext.Set <DAMInfo>().FirstOrDefault(); return(damInfo != null?Mapper.Map <DAMInfo, DAMInfoDto>(damInfo) : new DAMInfoDto { UniqueID = "1" }); }
public DAMInfoDto GetDamByID(string id) { DAMInfo damInfo = _DBContext.Set <DAMInfo>().FirstOrDefault(d => d.UniqueID == id); return(damInfo != null?Mapper.Map <DAMInfo, DAMInfoDto>(damInfo) : null); }