using Asp.net Identity Framework With DTO in domain Driven Design -


i designing application based on ddd architecture , have following layer presentation(asp.net mvc project) application layer(service layer ,facade underlying layer) domain layer infrastructure layer(repository , unit of work) based on ddd supposed pass dto presentation layer application layer , mapping domain model happen in application layer , problem inheriting usermanagmentservice(application layer) layer asp.net identity frmaework usermanager , , when calling usermanagmentservice.createasync(); method expect domain model entity cant pass dto usermanagmentservice , below code

presentation layer (mvc)

 public actionresult create(formcollection collection)         {             try             {           var userapplicationservice = new usermanagmentservice<int>();                 var userdto=new userdto();           userdto.name="some name" //the below line doesnt work because expecting type nherited identityuser , in case domain model , not dto       userapplicationservice.createasync(userdto,password)                  return redirecttoaction("index");             }             catch             {                 return view();             }         } 

application layer

public class  usermanagmentservice<tkey>:usermanager<user,int>,iusermanagmentservice<tkey>     {         #region members              #endregion         public usermanagmentservice(iuserstore<user,int> store)             : base(store)         {          }         }     } 

domain layer

    public class user:identityuser<int,userlogin,userrole,userclaim>     {         public string firstname { get; set; }         public string lastname { get; set; }         // extend user domain entity here      }  } 

so how can use dto in scenario , supposed overide usermanager method in usermanagmentservice?

thank you


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -