public JsonLocationType GetEmptyJsonLocationType() { var Result = new JsonLocationType(); var EmptyProp = new JsonTypeProperty(); Result.Properties.Add(EmptyProp); return Result; }
public JsonLocationType Update(JsonLocationType UpdatedLocationTypeJson) { ////First, do properties //foreach (var jsonProp in UpdatedLocationTypeJson.Properties) //{ // LocationTypeProperty UpdatedProp = jsonProp.ConvertToLocationTypeProperty(); //} //then do LT LocationType UpdatedLocationType = UpdatedLocationTypeJson.ConvertToLocationType(); Repositories.LocationTypeRepo.Update(UpdatedLocationType); var FullResult = Repositories.LocationTypeRepo.GetByKey(UpdatedLocationType.Key); Repositories.LocationRepo.UpdateWithNewProps(FullResult.Key); var JsonResult = new JsonLocationType(FullResult); return JsonResult; }
public JsonLocationType GetByKey(Guid Key) { var loc = Repositories.LocationTypeRepo.GetByKey(Key); var result = new JsonLocationType(loc); return result; }