Ejemplo n.º 1
0
 public static WorkDoneItem ToDomain(WorkDoneItemEntity entity)
 {
     return(new WorkDoneItem
     {
         Id = entity.Id,
         Created = entity.Created,
         AccountId = entity.AccountId,
         InvoiceId = entity.InvoiceId,
         WorkDoneDate = entity.WorkDoneDate,
         Margin = entity.Margin,
         Forecast = entity.Forecast
     });
 }
Ejemplo n.º 2
0
        public Guid Create(WorkDoneItem workDoneItem)
        {
            var entity = new WorkDoneItemEntity
            {
                AccountId    = workDoneItem.AccountId,
                InvoiceId    = workDoneItem.InvoiceId,
                WorkDoneDate = workDoneItem.WorkDoneDate,
                Margin       = workDoneItem.Margin
            };

            Context.Create(entity);
            Context.SaveChanges();

            return(entity.Id);
        }
Ejemplo n.º 3
0
 public static WorkDoneItem ConvertToDomain(this WorkDoneItemEntity entity)
 {
     return(ToDomain(entity));
 }