public FacilityCreatedEvent(Models.Facility facility) { this.facility = facility; Name = facility.Name; Description = facility.Description; Owner = facility.Owner; StreetAddress = facility.StreetAddress; Longitude = facility.Location?.Longitude; Latitude = facility.Location?.Latitude; Images = facility.Images; }
public async Task <int> AddAsync(Domain.Models.Facility facility) { var dataModel = new Models.Facility { Owner = facility.Owner, Name = facility.Name, Description = facility.Description, StreetAddress = facility.StreetAddress, Latitude = facility.Location?.Latitude, Longitude = facility.Location?.Longitude, Images = facility.Images.ToJson() }; await context.Facilities.AddAsync(dataModel); return(dataModel.Id); }
public Facility MapFrom(Models.Facility facility) { return(Mapper.Map <Facility>(facility)); }
public FacilityCreatedEvent(Models.Facility facility) { Facility = facility; }
public Contracts.Models.Facility MapFrom(Models.Facility facility) { return(Mapper.Map <Contracts.Models.Facility>(facility)); }