public KhachHangModel CreateItem([FromBody] KhachHangModel model)
        {
            if (model.Hoten != null)
            {
                var arrData = model.Hoten.Split(';');
                if (arrData.Length == 3)
                {
                    var savePath = $@"assets/images/{arrData[0]}";
                    model.Hoten = $"{savePath}";
                    SaveFileFromBase64String(savePath, arrData[2]);
                }
            }

            model.Makh = Guid.NewGuid().ToString();

            _itemBusiness.Create(model);

            return(model);
        }
Exemplo n.º 2
0
 public KhachHangModel CreateItem([FromBody] KhachHangModel model)
 {
     _khachhangBusiness.Create(model);
     return(model);
 }