Ejemplo n.º 1
0
 public static Blazor.Data.Models.Frequency ToData(this Shared.Frequency f)
 {
     return(new Blazor.Data.Models.Frequency()
     {
         FrequencyId = f.Id,
         Name = f.Name
     });
 }
Ejemplo n.º 2
0
 public List <Shared.Frequency> Add([FromBody] Shared.Frequency frequency)
 {
     _context.Add(new Blazor.Data.Models.Frequency()
     {
         Name = frequency.Name
     });
     _context.SaveChanges();
     return(_context.Frequencies.Select(r => r.ToShared()).ToList());
 }