Ejemplo n.º 1
0
    public bool SaveFolder(Folder folder)
    {
        if (folder == null)
        {
            return(false);
        }

        if (folder.Id == 0)
        {
            folder.CreateOnDate = DateTime.Now;
            _foldersRepository.Folders.Add(folder);
        }

        //change this to cast the SaveChanges to bool
        // also not so sure this is a gd idea... bt thats by the by for this....
        //---------------------
        try
        {
            _foldersRepository.SaveChanges();
            return(true);
        }
        catch (exception ex)
        {
            return(false);
        }
        //---------------------
    }