示例#1
0
 public void Update(msg.Customer src, string user, IProductRepository products, IDbSession session)
 {
     Name    = src.Name;
     Company = src.Company;
     Licenses.Merge <msg.License, License, string>(src.Licenses,
                                                   args => args.Key,
                                                   args => args.Key,
                                                   (src, dst) => dst.Update(src, user, products, session),
                                                   src => Licenses.Add(new License(src, user, session)),
                                                   dst => Licenses.Remove(dst));;
     base.CreateOrUpdate(user, session);
 }
示例#2
0
 public Customer(msg.Customer dto, string user, IProductRepository products)
 {
     Update(dto, user, products, products.DbSession);
 }