Search Results

Search found 3 results on 1 pages for 'vbobruisk'.

Page 1/1 | 1 

  • Entity Framework + AutoMapper ( Entity to DTO and DTO to Entity )

    - by vbobruisk
    Hello. i got some problems using EF with AutoMapper. =/ for example : i got 2 related entities ( Customers and Orders ) and theyr DTO classes : class CustomerDTO { public string CustomerID {get;set;} public string CustomerName {get;set;} public IList< OrderDTO Orders {get;set;} } class OrderDTO { public string OrderID {get;set;} public string OrderDetails {get;set;} public CustomerDTO Customers {get;set;} } //when mapping Entity to DTO the code works Customers cust = getCustomer(id); Mapper.CreateMap< Customers, CustomerDTO (); Mapper.CreateMap< Orders, OrderDTO (); CustomerDTO custDTO = Mapper.Map(cust); //but when i try to map back from DTO to Entity it fails with AutoMapperMappingException. Mapper.Reset(); Mapper.CreateMap< CustomerDTO , Customers (); Mapper.CreateMap< OrderDTO , Orders (); Customers customerModel = Mapper.Map< CustomerDTO ,Customers (custDTO); // exception is thrown here Am i doeing something wrong ? Thanks in Advance !

    Read the article

  • asp.net mvc, jquery dialog + select + getJson (different results in ff, ie and chrome)

    - by vbobruisk
    Hi everybody. i'm using jquery 1.3.2, and have a problem in situatsuin where i fill select via getJson $.each(data, function() { $("#select_elem").append("<option value='"+this.Value+"'>" + this.Value + "</option>"); }); and after, when i try to get selected value : var sel_val = $("#select_elem"); alert(sel_val.val()); in IE it works, in FF it always shows the first value in list, in chrome it's always null. is there any way to fix this? Thank You !

    Read the article

1