public Guid Create(Model.ESSObject eSSObject) { Domain.ESSObject domain = mapper.Map <Domain.ESSObject>(eSSObject); objectRepository.Create(domain); objectRepository.SaveChanges(); return(domain.Id); }
public Model.ESSObject ReadNowUid(Guid uid) { Domain.ESSObject ReadNowUid = objectRepository.ReadAll().Where(x => x.stationUUID == uid.ToString()).OrderByDescending(x => x.CreateTime).FirstOrDefault(); return(ReadNowUid == null?null: this.mapper.Map <Model.ESSObject>(ReadNowUid)); }