public Sms Post([FromBody] Sms Sms) { if (ModelState.IsValid) { Sms = _Smss.AddSms(Sms); _logger.Log(LogLevel.Information, this, LogFunction.Create, "Sms Added {Sms}", Sms); } return(Sms); }
public void ImportModule(Module module, string content, string version) { List <Sms> Smss = null; if (!string.IsNullOrEmpty(content)) { Smss = JsonSerializer.Deserialize <List <Sms> >(content); } if (Smss != null) { foreach (Sms Sms in Smss) { Sms _Sms = new Sms(); _Sms.ModuleId = module.ModuleId; _Sms.Name = Sms.Name; _Smss.AddSms(_Sms); } } }