Base solution for your next web application

Activities of "sudmanche"

So what is the suggested way of extending OU? I would like to add a extra property, such as OUType int or similar.

I have had a similar issue, it is caused because the Navigation properties lose state when POSTed to the update, so AutoMapper then thinks you have updated the entity to a null value.

It is a symptom of trying to use AutoMapper to map the DTO back to the entity.

Check you need the navigation properties, or just the id's, or code the mapping manually, or, define a second DTO without navigation properties, then in the update map the original DTO to the cutdown DTO, then map that DTO to the domain entity (not very pretty, but effective).

like this...

if (ModelState.IsValid)
            {
                var entity = await _entityManager.FindAsync(model.entityDto.Id);

                //map via edit DTO to ignore Navigation Properties
                var editEntityDto = model.entityDto.MapTo<EntityEditDto>();
                editEntityDto.MapTo(activity);

                await _activityManager.UpdateAsync(entity);

                return RedirectToAction("Index");
            }

hope that makes sense!

Question

Hi, I created a aspnetboilerplate template on version 0.8.3, I tried updating via nuget to 0.9.1 but there were hundreds of errors. It seems there are extensive changes to core entities (module zero at least).

Is there any information about how to update between versions? what the changes are? etc...

I would like to be able to keep up to date where possible.

thanks

Showing 1 to 3 of 3 entries