public PartnerModel GetCreateModel()
        {
            var model = new PartnerModel();

            this.FillPartnerModel(model);

            return model;
        }
        public long CreatePartner(PartnerModel model)
        {
            var partner = new PartnerEntity { Name = model.Name, Disabled = model.Disabled };

            this.Manager.Create(partner);

            return partner.Id;
        }
        public PartnerModel GetEditModel(long id)
        {
            var partner = this.Manager.Load(id);

            var model = new PartnerModel { PartnerId = partner.Id, Name = partner.Name, Disabled = partner.Disabled };

            this.FillPartnerModel(model);

            return model;
        }
        public long UpdatePartner(PartnerModel model)
        {
            Contract.Assert(model.PartnerId.HasValue);

            var partner = this.Manager.Load(model.PartnerId.Value);

            partner.Name = model.Name;
            partner.Disabled = model.Disabled;

            using (var tx = new Transaction())
            {
                this.Manager.Update(partner);

                tx.Complete();
            }

            return partner.Id;
        }
 public void FillPartnerModel(PartnerModel model)
 {
 }