Exemplo n.º 1
0
        private Catalog MapModelToEntity(CatalogBO model)
        {
            Catalog entity = new Catalog
            {
                CatalogType = model.CatalogType,
                Description = model.Description,
                Id          = model.Id,
                Name        = model.Name,
                Updated     = model.Updated
            };

            return(entity);
        }
Exemplo n.º 2
0
        private CatalogBO MapEntityToModel(Catalog entity)
        {
            CatalogBO model = new CatalogBO
            {
                CatalogType = entity.CatalogType,
                Description = entity.Description,
                Id          = entity.Id,
                Name        = entity.Name,
                Updated     = entity.Updated
            };

            return(model);
        }
Exemplo n.º 3
0
        public async Task <CatalogBO> AddAsync(CatalogBO model)
        {
            Catalog result = await _commands.AddAsync(MapModelToEntity(model));

            return(MapEntityToModel(result));
        }