Exemplo n.º 1
0
 public Result <PostingItem> New()
 {
     return(_servicesCodeMapperServices.GetDefault(false).Bind(mapper => Result <PostingItem> .Ok(new PostingItem
     {
         CodeMappingId = mapper.Id,
         CodeMapping = mapper.MapperName,
         StartDate = DateTime.Today.Date,
         EndDate = DateTime.Now.AddMonths(1).AddDays(-1).Date,
         EntityState = ItemState.Added
     })));
 }
Exemplo n.º 2
0
        public Result <CodeMapperItem> Get(int?id)
        {
            var item = id.HasValue ? _serviceRead.GetById(id.Value) : _serviceRead.GetDefault();

            return(item);
        }